如文档中所述,使用应用程序引擎对nodejs进行全局部署 [英] global deployment of nodejs with app engine as described in the docs

查看:257
本文介绍了如文档中所述,使用应用程序引擎对nodejs进行全局部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此文章中,Google描述了全球部署在App Engine Flex中的Node.js应用程序.

In this article, Google describes a global deployment of a nodejs app in app engine flex.

此图片来自该文章.

根据我的理解,问题是不可能的,原因有两个.

The problem is on my understanding is this not possible from two reasons.

  1. 无法访问GCLB中的跨项目资源来创建bakend服务.

  1. It is not possible to access cross project resources in GCLB to create a bakend service.

无法从GAE Flex看到实例组来创建bakend服务.

It is not possible to see the instance groups form GAE Flex to create a bakend service.

我的第一个想法是通过运行在单独项目每个区域中的计算引擎实例上的nginx代理所有请求.

My first idea was to proxy all requests over nginx running on compute engine instances in each region on separate project.

我该怎么做?

感谢您的帮助.

推荐答案

如前所述,该图的问题在于,尽管App Engine Flex实例实际上在您的项目中运行,但您看不到它们,并且您可以不能将它们用作全局负载平衡器的后端.确实,此图是错误的,不能按原样实现.我已请求文档更新以更正此问题.

As you mentioned, the issue with that diagram is that, although App Engine Flex instances actually run in your project, they are not visible to you and you can't use them as backend for the global load balancer. Indeed, this diagram is wrong and can't be implemented as-is. I've requested a documentation update to correct that.

您也提到过,一种解决方法是通过在相同区域中运行的Compute Engine VM将请求代理到App Engine.但这并不是最佳选择,并且可能会引入单点故障.

One workaround, as you also mentioned, is to proxy requests to App Engine via Compute Engine VMs running in the same region. This isn't optimal though and may introduce a single point of failure.

由于App Engine Flex实际上在VM上运行Docker容器,因此您可以使用Google Kubernetes Engine实现类似的设置,其优点是可以在同一项目的每个区域中运行一个集群.

Since App Engine Flex actually runs Docker containers on VMs, you can achieve a similar setup using Google Kubernetes Engine, with the advantage that you can run one cluster per region, all in the same project.

这篇关于如文档中所述,使用应用程序引擎对nodejs进行全局部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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