AppEngine跨多个区域的负载平衡 [英] AppEngine load balancing across multiple regions

查看:32
本文介绍了AppEngine跨多个区域的负载平衡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到AppEngine项目仅定义为一个区域,而Google会自动为您处理负载平衡.但是,如果我在全球不同地区(似乎是在不同项目中)有应用程序,那么我该如何使用Google Cloud中的HTTPS负载均衡器根据请求来自的位置自动路由流量?(同时考虑标准和灵活)

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)

推荐答案

GCP中的负载均衡器可以平衡到不同实例的流量

The Load Balancer in GCP can balance the traffic to different instances based on the region.

但是,为此,您应该在同一项目中使用VM实例.如果您使用的是App Engine Flexible,则在部署应用程序时会为每种服务创建实例组来管理您的实例,因此可以将它们添加到您的负载均衡器中.

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.

然后,您可以将Flexible环境中其他项目中拥有的其他应用程序移动到具有负载均衡器的项目中,

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.

这篇关于AppEngine跨多个区域的负载平衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆