Internal HTTP Load Balancer across regions? | C2C Community

Internal HTTP Load Balancer across regions?

  • 15 June 2022
  • 7 replies

Userlevel 3

Hi There!

We've come across a challenge using an internal HTTP load balancer (L7) and could use some advice.

We're working on a project in Canada that requires GPUs (which GCP does not offer in Canada). Our Cloud Run project needs to stay in Canada due to speed/latency and data laws, however, this is forcing us to use VMs (GCE) in the US to gain access to GPUs.

We want to internal load balance (HTTP) on our VPC (Cloud Run as the client in the Canada region and GCE+GPUs as the backend in a US region), but this doesn't seem possible. It appears the only way to load balance across regions is to use a TCP load balancer, which doesn't work as well (doesn't allow us to scale on metrics like number of requests or requests/second).

We've considered setting up an Nginx proxy and other types of proxies that would allow us to cross regions, but it would be so much easier to use a GCP-native solution that autoscales.

Any suggestions?



Best answer by seijimanoan 23 June 2022, 18:06

View original

7 replies

Userlevel 7
Badge +24

Hi @ljzazmic , really Interesting architecture question, I internally tagged some Google Engineers as long as Google Partners so they can provide a suggestion for you!


Userlevel 3

Thank you for your help! At this point, we’re open to all suggestions :-)


Userlevel 6
Badge +6

Hey there, @ljzazmic. How are you?


I had success with that by using an internal TCP/IP load balancer, so I can request from other VPC and region. Because I can set up the global access. It's still regional, but it has cross regional access.


So you can create a VPC peering between them.


Have you tried that?

Userlevel 3

Thanks for the response @seijimanoan.

It sounds like you are using an internal TCP/IP LB to bridge the regions.

We specifically need to use an L7 (https) load balancer in order to balance based on metrics like number of requests or requests/second.

Are you suggesting that you are combining an internal TCP/IP LB *and* an L7 internal LB in a way that offers L7 balancing across regions?


Userlevel 6
Badge +6

It depends on design. We have some ways to think about it.

Does your architecture have Serverless VPC Access?

In docs, I found an interesting example:


So, based on this example, you could have two subnets in different regions in the same VPC network.

I can’t try it right now. But I think you can check it out carefully.

@ljzazmic I hope it helps! Let me know.

Userlevel 7
Badge +16

Awesome reply, @seijimanoan

@ljzazmic let us know if that was helpful! 😎

Userlevel 3

Thanks @seijimanoan for the reference to the serverless VPC connector. This may provide a workable solution. I’ve passed this info on to our main tech person to see if this is a viable option!

Thanks again!