google-cloud-platformload-balancinginternal-load-balancer

Load balanced service serving both internal and external users GCP


We are in the process of setting up a service on GCP that will serve requests from both the internet and from other services inside of our VPC.

We already have a global load-balancer setup and want all traffic to our new service to be load-balanced as well.

Is it advisable to have our internal services use the global LB address when trying to reach the new service? Or should we be setting up internal LBs behind the global LB for internal services to use?

If we were to use the global LB for both internal and external clients, are there any performance disadvantages compared to using and internal LB?

Thanks and I appreciate the help!


Solution

  • Use two load balancers in parallel (as in they are independent of each other). The Global Load Balancer for the Internet and the Internal Load Balancer for VPC access. The type (HTTP/TCP) depends on the traffic you want to serve. Think Layer 7 (HTTP) versus Layer 3/4 (TCP/UDP).

    For VPC access there are performance advantages using an Internal load balancer. The biggest is a reduction in the number of hops (VPC -> Internet -> Load Balancer -> VPC). The second is that your VPC network speed is faster staying within the VPC.