An external passthrough Network Load Balancer is not a proxy: backend VMs receive load-balanced packets with the original source and destination IP addresses, so the application sees the client's IP address, and it load balances traffic that comes from clients on the internet. Google recommends choosing a passthrough Network Load Balancer to preserve client source IP addresses. An external proxy Network Load Balancer with a TCP proxy (B) terminates connections at the load balancer and by default does not preserve the original client IP address and port; you would have to enable the PROXY protocol. The SSL proxy variant (C) has the same limitation and is meant for offloading SSL/TLS, which this plain TCP application doesn't need. An internal passthrough Network Load Balancer (D) uses an internal IP address that is accessible only to systems in the same VPC network, so it cannot expose the application to the internet.
Community Discussion