Q82 — AWS DVA-C02 Ch.1
Question 82 of 100 | ← Chapter 1
A company plans to deploy an application behind an Elastic Load Balancer on AWS. The application uses HTTP/HTTPS listeners and must access client IP addresses. Which load balancing solution meets these requirements?
- A. Use an Application Load Balancer and 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. Register targets by instance ID.
- D. Use a Network Load Balancer and the X-Forwarded-For header.
Correct Answer: A. Use an Application Load Balancer and the X-Forwarded-For header.
Explanation
The Application Load Balancer (ALB) natively supports HTTP/HTTPS and automatically inserts the X-Forwarded-For header containing the client's original IP address. NLB operates at Layer 4 and does not add X-Forwarded-For headers; while proxy protocol can preserve client IPs, it requires explicit application-level support and is less straightforward than ALB’s built-in capability. Option C (registering by instance ID) does not relate to client IP retrieval. Option D is invalid because NLB does not generate or populate X-Forwarded-For headers. Therefore, A is correct.