Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tuning nginx worker_process to obtain 100k hits per min

Tags:

nginx

People also ask

How many requests can NGINX handle per second?

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

How many concurrent connections can NGINX handle?

Nginx is event based and by default runs as 1 process supporting max 512 concurrent connections.

What is Worker_processes NGINX?

What are worker_processes in Nginx. The worker_processes are used to specify the total number of worker processes to spawn simultaneously. The number of worker_processes in Nginx is set to one by default. Executing one worker process per CPU core works perfectly, and we also recommend you configure it in this way.


Config file:

worker_processes  4;  # 2 * Number of CPUs

events {
    worker_connections  19000;  # It's the key to high performance - have a lot of connections available
}

worker_rlimit_nofile    20000;  # Each connection needs a filehandle (or 2 if you are proxying)


# Total amount of users you can serve = worker_processes * worker_connections

more info: Optimizing nginx for high traffic loads