Q13 — AWS DVA-C02 Ch.1
Question 13 of 100 | ← Chapter 1
A company plans to deploy an application on AWS using a load balancer. The application uses HTTP/HTTPS listeners and must preserve client IP addresses. Which load balancing solution meets these requirements?
- A. Use an Application Load Balancer (ALB) with the X-Forwarded-For header. ✓
- B. Use a Network Load Balancer (NLB). Enable proxy protocol support on both the NLB and the target application.
- C. Use an Application Load Balancer (ALB). Register targets by instance ID.
- D. Use a Network Load Balancer (NLB) with the X-Forwarded-For header.
Correct Answer: A. Use an Application Load Balancer (ALB) with the X-Forwarded-For header.
Explanation
The X-Forwarded-For header is a standard HTTP header used to preserve the original client IP address when requests pass through proxies or load balancers. An Application Load Balancer (ALB) supports and automatically populates the X-Forwarded-For header for HTTP/HTTPS traffic, satisfying the requirement. Option B mentions NLB with proxy protocol: while NLB can preserve client IPs via proxy protocol, it does not support X-Forwarded-For (an HTTP-layer header), making it incompatible with the stated requirement. Option C (registering by instance ID) relates to target registration, not IP preservation. Option D is invalid because NLB does not support the X-Forwarded-For header. Therefore, Option A is correct.