GeoDNS routing on Google Cloud Load Balancer with Google App Engine as backend - google-app-engine

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.

Related

Does App Engine automatically load balance if we configure it to auto-scale?

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.

How can I use Google Cloud CDN for static website hosted on Google App Engine?

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.

How to deploy app on Google Compute engine similar to app engine?

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.

Google Cloud Datastore requires app engine?

Im creating a Node.js website that probably won't have loads of traffic, and was looking into cheap solutions to host the site. Came across Google cloud services offering free usage for their services with limits. A f1-mirco is more than enough for my needs, but I will happily pay for some usage if it goes over by any chance.
I wanted to setup a linux centOS 7 on GCE (which I already did), and run my application and REST API on it. Now here comes the problem.
I tried to use Google's datastore service, but it sprung an app engine instance and without it datastore won't work.
Is datastore entirely relying on app engine to function?? In the docs, it said if you use any of the client API, it requires app engine. What can I do to not use the client api and query data then? Don't want to use the app engine at the moment or datastore is just not for me then?
Thanks for any help!
Some of the underlying infrastructure of Cloud Datastore and App Engine are still tied together for creation, etc. So while creating an Cloud Datastore database also defines an App Engine instance for the project, it doesn't require you to use it. You don't get charged for App Engine either, unless you decide to deploy an App using it.
You should be totally fine use the Google Cloud Node client library on the f1 micro instance.

Does Google App Engine charge for network traffic between apps?

I am going to build an API for my mobile app using GAE. I am looking for a way to separate the whole application into separate services, trying out the microservice architecture.
The problem is there seems to be no information about any VPN or private network between GAE apps. Therefore, based on my understanding, when one of the GAE apps sends HTTP requests to other GAE apps in same account, its traffic will be treated as Internet traffic and therefore I will be charged for outbound bandwidth.
Am I correct?
Yes.
App Engine applications/Cloud Platform projects are isolated from each other by default, even if they were created using the same Google account.
Consider looking into Modules (link for Java) to implement individual services of your application.

Resources