
Answer-first summary for fast verification
Answer: Use External HTTP(S) Load Balancing with URL Maps and an X-Forwarded-For header
External HTTP(S) Load Balancing is the correct choice because it supports Layer 7 routing using URL Maps for hostname and path-based rules, which is required for content-based routing. It also provides global load balancing across multiple regions (us-west1 and us-east1), ensuring low latency and high availability. Autoscaling is supported via backend services. The X-Forwarded-For (XFF) header is automatically added by the HTTP(S) Load Balancer, allowing backends to see the original client IP addresses. Network Load Balancing (A) and TCP Proxy (B) operate at Layer 4 and lack URL/host-based routing. Option C's mention of 'custom headers' is unnecessary since XFF is the standard and default method for preserving client IPs in HTTP(S) LBs.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are setting up a new HTTP application that will be accessible externally via both IPv4 and IPv6 virtual IP addresses, using ports 80, 8080, and 443. Your backends are located in two regions: us-west1 and us-east1. The goal is to serve content with minimal latency while maintaining high availability, autoscaling, and implementing native content-based routing rules based on HTTP hostname and request path. The backends must also see the original client IP addresses. What is the appropriate load balancer configuration for this scenario?
A
Use Network Load Balancing
B
Use TCP Proxy Load Balancing with PROXY protocol enabled
C
Use External HTTP(S) Load Balancing with URL Maps and custom headers
D
Use External HTTP(S) Load Balancing with URL Maps and an X-Forwarded-For header