Interview Prep/Networking/Load Balancing, Proxies & CDN

What is the PROXY protocol and when do you need it?

AdvancedScenarioLoad Balancing, Proxies & CDN
Answer

Situation read → It carries the original client address across an L4 hop.

What I'd do →

  1. Enable PROXY protocol v2 on the NLB target group: proxy_protocol_v2.enabled=true
  2. Configure the backend to expect it: Nginx listen 443 ssl proxy_protocol; with set_real_ip_from and real_ip_header proxy_protocol;
  3. Do not enable it on one side only, because the backend then sees garbage in the first bytes and rejects with 400
  4. Verify with tcpdump -A on the first packet

Why → An L4 balancer cannot add HTTP headers, so the PROXY header is prepended to the TCP stream.

Interview tip → Say mismatched settings cause immediate protocol errors.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN