Skip to Content

Google Associate Cloud Engineer: Exposing Applications with Client IP Preservation on GCP Load Balancers

Learn how to expose applications that require client IP preservation to the internet using the appropriate GCP load balancer. Discover the differences between TCP Network Load Balancers and TCP Proxy Load Balancers.

Table of Contents

Question

You deployed an application on a managed instance group in Compute Engine. The application accepts Transmission Control Protocol (TCP) traffic on port 389 and requires you to preserve the IP address of the client who is making a request. You want to expose the application to the internet by using a load balancer. What should you do?

A. Expose the application by using an external TCP Network Load Balancer.
B. Expose the application by using a TCP Proxy Load Balancer.
C. Expose the application by using an SSL Proxy Load Balancer.
D. Expose the application by using an internal TCP Network Load Balancer.

Answer

B. Expose the application by using a TCP Proxy Load Balancer.

Explanation

To expose the application to the internet while preserving the client’s IP address, you should use a TCP Proxy Load Balancer. TCP Proxy Load Balancers support client IP address preservation, allowing the backend instances to receive the original client IP address in the X-Forwarded-For HTTP header.

TCP Network Load Balancers (options A and D) do not preserve the client IP address, as they perform destination network address translation (DNAT) to the backend instances.

SSL Proxy Load Balancers (option C) are used for SSL offloading and do not support client IP address preservation.

Therefore, the correct solution is to use a TCP Proxy Load Balancer, which preserves the client IP address and supports TCP traffic on port 389.

Google Associate Cloud Engineer certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Google Associate Cloud Engineer exam and earn Google Associate Cloud Engineer certification.