Google App Engine multiple regions

3,877 views
Skip to first unread message

Yon Dev

unread,
Jun 20, 2016, 5:13:12 AM6/20/16
to Google App Engine
I am evaluating whether GAE would be a good fit for an upcoming project.

I was wondering how scaling across regions work with GAE? If I set my project location to US and then create an GAE instance and most access to the GAE is from EU will it automatically scale out to Europe? 
Or how does it work?
If it was a on Compute Engine I believe I could have created multiple instances and then made a HTTP Load Balancer that would route the user to the closest instance based on proximity.

Reading the link above it says that it scales automatically within or accross multi-regional locations.
What does that mean? Do I have to enable automatic scaling across regions? If so, how do I do that?
And secondly, if it does handle automatic scaling across regions, the choice one makes for App engine location when creating a new project, is that irrelevant for a Google App Engine instance?

I tried asking on Stackoverflow but without answer so I am turning to you in hope for an answer.

Thank you in advance,
Yon

Nick (Cloud Platform Support)

unread,
Jun 20, 2016, 2:16:11 PM6/20/16
to Google App Engine
Hey Yon,

App Engine instances are scaled in zones within the region the application is created in. If you'd like to follow a pattern which others have made use of, you can deploy another project in the EU to handle traffic there. As you point out, an HTTP Load Balancer is a very useful in this situation, and you can use Container Engine to deploy Docker images of your applications, using Custom Runtimes.

I hope this has helped answer your question. Let me know if you have any further questions, and I'll be happy to assist.

Sincerely,

Nick
Cloud Platform Community Support
Message has been deleted

Yon Dev

unread,
Jun 21, 2016, 1:36:26 AM6/21/16
to Google App Engine
Hello Nick,

Thank you for your answer.

I might be misunderstanding something so please correct me if I am wrong.

I can only upload 1 app engine instance per project. So if I want to deploy to both the US and EU I will have to create 2 different projects. And if I were to create multiple projects, how should I handle my custom domain?

To have a single domain I believe I have to use a load balancer, but I thought the HTTP load balancer was only available when using Compute Engine and not for App Engine?
And if I were to have to have 2 separate projects I don't think it's possible to do load balancing between them, right?

Sincerely,
Yon

Tom Walder

unread,
Jun 21, 2016, 8:17:59 AM6/21/16
to Google App Engine
You cannot load balance between US and EU using "conventional" load balancing.

There might be some thoroughly complex way to do it with localised DNS responses.

However, it would be 2 distinct App Engine projects.

To be honest if cross-region load balancing is a need, App Engine is probably not the right solution. Look at Compute engine instead.

Tom

Kaan Soral

unread,
Jun 22, 2016, 4:38:22 AM6/22/16
to Google App Engine
I think one way or another, there's going to be a delay, why do you need to minimise the delay so much?

Even if the instances were spread over the world, I'm guessing there would be a smaller data access delay in most cases

I'm way outside US, my users are closer to EU, yet my appengine location is US, didn't have any issues up to now

Out of curiosity, I pinged my domain and the appspot domain, the domain is wrapped with Cloudflare

Appspot-> 30ms
Cloudflare-> 60ms

Before this experiment I expected Cloudflare to decrease the international ping, it didn't

Then I wget'd the domain

Appspot-> 0.1s
Cloudflare-> 0.2s

It obviously doesn't directly answer your question, yet it's an insight

Yon Dev

unread,
Jun 22, 2016, 11:01:59 PM6/22/16
to Google App Engine
Thank you all for your insight and answers.

I will take it under consideration.

Yon

Miguel Vitorino

unread,
Jun 30, 2016, 4:56:14 AM6/30/16
to Google App Engine
Kaan,

I believe the ping time to appspot.com domains is not indicative of the actual smallest response time as it only pings the entry point of Google's global edge network. Once your request is inside Google internal network, it will then travel to your GAE instances and back. If you ping an app from London, you only get 10s of ms, yet if you perform a full simple HTTP request it will add the 100ms of cross atlantic RTT at the very least.

Pavelescu Razvan

unread,
Mar 5, 2017, 11:12:22 AM3/5/17
to Google App Engine, t...@docnet.nu
Hello Tom,

I've just came across this section in the gcloud documentation: https://cloud.google.com/compute/docs/load-balancing/http/cross-region-example

Isn't this exactly what Yon tried to achieve?

Thanks,
Razvan

Nick (Cloud Platform Support)

unread,
Mar 6, 2017, 11:21:56 AM3/6/17
to Google App Engine, t...@docnet.nu
Hey Pavelescu,

The page you link, "Creating Cross-Region Load Balancing", from our docs, is relevant for Compute Engine instances, rather than App Engine. While App Engine Flexible Environment apps run on Compute Engine VM's, they deploy only to the same region that you select for your App Engine app when creating it, hence there's no possibility of cross-region load balancing for Flexible Environment apps either. This may change in the future (as anything could, I suppose), but I can't provide a guarantee of course. Feel free to file Feature Requests for any features you desire on our Issue Tracker.

Cheers,


Nick
Cloud Platform Community Support

Robert Dyas

unread,
Oct 2, 2017, 5:08:43 PM10/2/17
to Google App Engine
We need this too for GAE Standard Environment... basically an GAE in EU going to backend databases hosted on VMs in EU, and GAE in US going to backend databases hosted on VMs in US.


On Monday, June 20, 2016 at 5:13:12 AM UTC-4, Yon Dev wrote:

BG Bruno

unread,
Aug 7, 2018, 9:01:57 AM8/7/18
to Google App Engine
I agree - this function have to be there already


also "google functions" are regional 🙈

if I see it right "aws lambda, aws elasticbeanstalk, aws cloudformation" support loadbalancing 🤯


Q how can I create worldwide apps now with google ? 🙈😊
Reply all
Reply to author
Forward
Message has been deleted
0 new messages