问题
I understand that AppEngine project is defined to only one region and Google automatically handles the load balancing for you. But if I have apps in different regions across the world (In different projects as it seems to be a requirement) then how can I use the HTTPS load balancer in Google Cloud to automatically route the traffic based on the location where the request is coming from? (Consider both Standard and Flexible)
回答1:
The Load Balancer in GCP can balance the traffic to different instances based on the region.
But, to do this, you should be using VM instances in the same project. If you are using App Engine Flexible, Instance Groups are created, for each service, when you deploy your app, to manage your instances, so, they can be added to your Load Balancer.
Then, you could move the other apps you have in other projects, in the Flexible environment, to the project where you have the Load Balancer, as different services, and then, added to the Load Balancer.
Sadly, the only solution for the apps in the Standard environment is that they should be moved to the Flexible environment, in the same project as the Load Balancer, to be able to add them there.
来源:https://stackoverflow.com/questions/49867277/appengine-load-balancing-across-multiple-regions