Worker Processes and Connections

1 min read

Authors
banner
Table of Contents

Worker Processes and Connections

Worker Processes

nginx
worker_processes auto;

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

Worker Connections

nginx
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

nginx
worker_processes auto;

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

Maximum performance!

© 2026 Vijay Rajendranbuilt with Next.js & Tailwind · deployed on Vercel