Throughput tuning balances CPU, open files, and upstream behavior. Align worker_processes with cores (often auto), enable sendfile and tcp_nopush for static files, and cache file metadata with open_file_cache. For upstream HTTP, reuse connections with keepalive in the upstream{} block and clear the Connection header on proxied requests. TLS cost drops when ssl_session_cache is sized sanely and tickets are rotated.
| Goal | Knob | Watch for |
|---|---|---|
| Hot static assets | open_file_cache + sendfile | Inode and cache churn on volatile trees |
| TLS handshakes | ssl_session_cache shared | Memory sizing vs hit rate |
| Upstream reuse | keepalive + HTTP/1.1 | Pool size vs backend connection limits |
Related
nginx configuration basics, reverse proxy, nginx SSL, nginx vs Apache