An application runs behind a load balancer using HTTP/HTTPS and needs access to the original client IP addresses. Which load balancing solution satisfies this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Use an Application Load Balancer (ALB) and read client IPs from the X-Forwarded-For headers..
Why this is the answer
An Application Load Balancer (ALB) operates at Layer 7 (HTTP/HTTPS) and terminates the client connection, then establishes a new connection to the target. To preserve the original client IP, the ALB inserts the X-Forwarded-For header into the HTTP request before forwarding it to the backend. The application can then read this header to get the client's IP. A Network Load Balancer (NLB) operates at Layer 4 (TCP/UDP). While it can preserve client IPs by default for TCP connections, if the proxy protocol is not enabled, the source IP seen by the backend will be the NLB's IP. If proxy protocol is enabled on both the NLB and the backend, it can pass the original client IP, but the question specifically mentions HTTP/HTTPS, making ALB a more direct and common solution for this protocol. NLBs do not use X-Forwarded-For headers as they are Layer 7 constructs. Registering targets by instance ID is a configuration detail for ALBs but doesn't directly address preserving client IPs.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed