Interview Prep/Networking/Load Balancers, Proxies & CDNs

What is the PROXY protocol?

IntermediateConceptLoad Balancers, Proxies & CDNs
Answer

A small header (v1 text or v2 binary) prepended by an L4 proxy to the TCP stream carrying the original client IP and port, since the backend only sees the proxy's address. The backend must be configured to expect it, or every connection will fail.

nginx: listen 80 proxy_protocol;, then real_ip_header proxy_protocol;. NLB can enable it per target group when preserving source IP is not possible.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancers, Proxies & CDNs