Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 888
Matthew Sartori Avatar asked Sep 03 '25 14:09

Matthew Sartori


1 Answers

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.

like image 192
John Hanley Avatar answered Sep 05 '25 15:09

John Hanley