
Answer-first summary for fast verification
Answer: Update application code to utilize the X-Forwarded-For header for client IP extraction.
The correct answer is C. When an application is placed behind an ALB, it adds an X-Forwarded-For header to HTTP requests, which contains the original IP address of the client. Modifying the application code to inspect this header allows it to obtain the client's IP address, ensuring proper processing without impacting scalability. This solution leverages existing functionality provided by the ALB and avoids the complexity and potential cost of switching to different load balancers or custom headers.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
An application in AWS, placed behind an Application Load Balancer (ALB), requires access to the client's IP address for processing. The current setup masks the client IP with the same address. What is the cost-effective solution to retain client IP visibility while maintaining scalability?
A
Remove the ALB and configure Route 53 for direct instance traffic.
B
Replace the ALB with a Classic Load Balancer using HTTP for traffic direction.
C
Update application code to utilize the X-Forwarded-For header for client IP extraction.
D
Implement a custom header solution for client IP address transmission between the client and application.
No comments yet.