Performance Commands
Maximize Nginx performance through compression settings, proxy caching, static file optimization, worker configuration, and connection tuning for high-traffic web applications.
8 commands
Pro Tips
Enable gzip compression for text assets: `gzip on; gzip_types text/plain text/css application/json application/javascript;`
Set `worker_processes auto;` to automatically match CPU cores and `worker_connections 1024;` for concurrent connections.
Enable proxy caching with `proxy_cache_path` to cache backend responses and reduce load on application servers.
Use `sendfile on;` and `tcp_nopush on;` to optimize static file delivery and reduce system calls.
Common Mistakes
Aggressive caching can serve stale content. Use cache invalidation strategies and appropriate Cache-Control headers.
Monitor worker process CPU usage - if consistently high, consider increasing `worker_processes` or optimizing backend.