Worker Processes and Connections

1 min read

Authors
banner

Worker Processes and Connections

Worker Processes

worker_processes auto;

Sets number of workers equal to CPU cores. Let Nginx detect!

Worker Connections

events {
    worker_connections 1024;
}

Maximum connections per worker.

Calculation:

  • Max connections = worker_processes × worker_connections
  • With 4 cores, 1024 connections = 4,096 max connections

Tuning

worker_processes auto;

events {
    worker_connections 2048;
    use epoll;  # Linux only
}

Maximum performance!

© 2025 Vijay Rajendran