global deployment of nodejs with app engine as des

2019-08-29 06:29发布

问题:

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

This image is from the article.

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

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

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

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

How can i do that?

Thanks for any help.

回答1:

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.

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.

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.