I'm using App Engine Standard Environment.
I'm allowed to choose one region to serve on project creation.
Lets assume clients of my app are world-spread (America, Europe, Asia), and all of them are equally-important.
Latency difference is significant (I'm in Europe now, simple Hello world page sample is ~200ms if I choose us-central region, and ~080ms if I choose Europe region).
Any way to achieve multi-region serving on appengine? Can I easy move to GKE or smth to archive this?
Glad to hear any theoretical explanations-comments on multi-region serving.
I don't know enough about App Engine or the App Engine Flexible Environment to know if you can run the same app in multiple regions and load balance between them, but I do know that you can do multi-region serving from GKE or GCE using HTTP(S) Load Balancing.
You can easily move from the App Engine Flexible Environment to GKE as they both use Docker containers for deploying your application.
You can use an HTTPS Load balancer with Serverless NEG backend for GAE multi-region serving. See https://stackoverflow.com/a/62660953/4185100
Related
Does App Engine automatically load balance if we configure the App Engine to auto-scale? Or do we manually need to add a load balancer for an app hosted on App Engine?
I just started learning GCP this week and I have been given an assignment by my trainer to deploy an application on App Engine and to connect it to a load balancer and a CDN. I have understood how to use load balancers with Compute Engine. But since App Engine takes care of auto-scaling without us having to configure anything, does it also take care of load-balancing automatically? Or do we have to manually setup a load balancer? I tried to search a lot about load balancers with App Engine but the only thing I could find was some "Network Endpoint Groups(NEG)". I couldn't understand any of NEG articles because I am not familiar with containers and Kubernetes. Can someone please explain load balancing for App Engine and how to do it?
Yes, GAE includes a load balancer. As soon as you scale to 2 instances, this is necessary and GAE takes care of it for you. GAE does an amazing job of taking care of this for you (much better than AWS Elastic Beanstalk for example).
For more complicated situations (e.g., Kubernetes), you can manually create and configure a load balancer. I don't think you would ever you use a custom load balancer with GAE.
I am serving a super simple static website on Google App Engine. I chose the Zurich location which serves content pretty decently within all locations that I tested within Europe. Speed tests that I did online show <1s page load speeds within Europe. In the US, especially west coast, South America, Asia and Australia the page load time is, however, over 3s which is for me not acceptable.
Therefore I thought of using Google Cloud CDN. Unfortunately their CDN seems to require some HTTPS load balancers and I have no idea how to set that up. Seems silly if Google had their own CDN but that doesn't work with their App Engine so I'd have to go to Cloudflare.
Unfortunately, you're not able to use Google Cloud CDN for you site on Google App Engine. Nowadays Cloud CDN could be used to serve content that originates from Cloud Storage buckets, Compute Engine instance groups, and Compute Engine network endpoint groups.
Have a look at the documentation Overview of Cloud CDN:
The Cloud CDN content delivery network works with HTTP(S) load
balancing to deliver content to your users. The HTTP(S) load balancer
provides the frontend IP addresses and ports that receive requests and
the backends that respond to the requests.
Cloud CDN content can be sourced from various types of backends:
Instance groups
Zonal network endpoint groups (NEGs)
Internet network endpoint groups (NEGs) (Beta), for endpoints that are outside of Google Cloud (also known as custom origins)
Buckets in Google Cloud Storage
I found at Google Public Issue Tracker two feature requests about adding Cloud CDN support for App Engine Standard and Flexible - you can join these cases, comment and track progress.
Possible workaround for a simple site you can find in this article.
I want to deploy and app using compute engine as my company does not provide access to app engine yet. Is there a way to deploy the same app using compute engine rather than app engine on google cloud. I have searched multiple forum but unable to find relevant answers.
Any help would be much appreciated.
With python3, I recommend you to write a Flask web application. Your web application will be similar on App Engine and on your compute.
However, you have several things to perform at the infrastructure level. I recommend you to have a look to managed Instances group with auto scaling and health check and Global load balancer.
Note: Because, it's not serverless, you have to pay at least 1 instance even if there isn't traffic on your app
Alternatively, you can have a look to GKE (easier VM management and scaling) and Cloud Run.
We are looking to use Google App Engine for one of our low latency service. We are required to provide low latency service across the globe. Since Google App Engine is a regional service and there is no straight forward way to deploy it multi-regional. So, looking at Google Load Balancer to route at DNS level, but that also does not seems to be possible as load balancer not supporting App Engine as a backend service. Is there any other way to achieve GeoDNS routing in GCP for App Engine service.
There is not an direct way to achieve GeoDNS routing since App Engine is a regional service, as you said.
Read this feature request to have further insight on this. In the second comment they state the two possible workarounds, useful for both standard and flexible environments:
The workaround is how you mentioned, using a single project with a load balancer to route requests to Compute Engine instances in
different regions. Then have each Compute Engine instance act as
proxies to an App Engine project in each of the different regions
(where you would copy your code to each App Engine project).
It may be easier in the meantime to use Google Kubernetes Engine instead of App Engine for multi-regional application serving.
You could star the FR to support it.
Google CloudSQL gives the option to allow it to follow an App Engine app for better performance.
How can I do the same with a Google Compute Engine instance? Otherwise what is the best Google data center to house my instance for best performance with a US based App Engine app?
Depending on what you're trying to achieve the way to go might be an app with two modules, one of which is a managed vm.
If you need a persistent disk in your managed vm you can mount cloud storage with fuse in your managed vm.