Interview Prep/Networking/Load Balancing, Proxies & nginx in Production

Which nginx directives matter most for a production reverse proxy?

IntermediateProductionLoad Balancing, Proxies & nginx in Production
Answer

worker_processes auto, worker_connections 4096, keepalive in upstream blocks plus proxy_http_version 1.1 and proxy_set_header Connection "", proxy_next_upstream limited to idempotent errors, sane proxy_*_timeout, client_max_body_size, gzip or brotli, access_log with $request_time and $upstream_response_time, and limit_req.

log_format main '$remote_addr "$request" $status $body_bytes_sent rt=$request_time urt=$upstream_response_time ua="$http_user_agent"';
All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & nginx in Production