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

How do you log and measure request latency at the proxy?

BeginnerProductionLoad Balancing, Proxies & nginx in Production
Answer

Log $request_time (total) and $upstream_response_time (backend only) in nginx, plus $upstream_connect_time. The difference shows client or proxy delay versus backend delay. For ALB, access logs give request_processing_time, target_processing_time and response_processing_time.

Export histograms (not averages) and watch p95 and p99. Averages hide tail problems.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & nginx in Production