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

查看:20
本文介绍了跨多个区域的 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.

然后,您可以将您在其他项目中的其他应用程序(在弹性环境中)移动到您拥有负载均衡器的项目,作为不同的服务,然后添加到负载均衡器.

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天全站免登陆