Performance problems
When designing an application and configuring NGINX to deliver it, we expect it to perform well. When we experience performance problems, however, we need to take a look at the reasons that could cause them. It may be in the application itself. It may be our NGINX configuration. We will investigate how to discover where the problem lies.
When proxying, NGINX does most of its work over the network. If there are any limitations at the network level, NGINX cannot perform optimally. Network tuning is again specific to the operating system and network on which you are running NGINX, so these tuning parameters should be examined in your particular situation.
One of the most important values relating to network performance is the size of the listen
queue for new TCP connections. This number should be increased to enable more clients. Exactly how to do this and what value to use depends on the operating system and optimization goal:
Linux:
vi /etc/sysctl.conf net.core.somaxconn...