Multi-region deployment of Google app engine project - google-app-engine

When deploying my app engine project I have set the location as us-central. As per link, this location refers to Iowa region. This is the region that will be used for my Datastore as well. However, as per link, this refers to the whole of United States with multi-regional availability. Where is my data in Datastore stored - is it regional or multi-regional?

App Engine and Datastore locations are indeed dependent. This comes from the fact that Datastore was originally accessible from App Engine only and designed in consequence.
You are asked to choose a location for your project app when you complete any of the following tasks:
Create a new App Engine application.
Create your first Cloud Datastore entity using the Google Cloud
Platform Console.
When you choose a location for one of them, this location setting will also apply to the other. Now, as you noted, Datastore offers multi-region locations while App Engine doesn't. In your situation for example, choosing us-central makes your App Engine application run in the Iowa region while your Datastore operates in a multi-zone and multi-region replicated configuration within the US. By choosing another location where both App Engine and Datastore operate in a regional configuration like us-east1 for example, both will be located in South Carolina.

Related

Does locationId "europe-west" represent Belgium or the multi-region in the EU?

Create new project in Google Cloud Console
Create a new entity in empty Cloud Datastore. When prompted for the location, choose europe-west, which according to Cloud Datastore Locations represents the multi-region of Europe.
Reasoning:
maximize the availability and durability of your database. Multi-region locations can withstand loss of entire regions and maintain availability without data loss. In the Cloud Datastore Service Level Agreement, multi-region locations define a higher monthly uptime percentage than regional locations.
Next, create and deploy new Google App Engine (standard env) app into the same project.
Cloud Datastore Locations also explains:
The location setting for your Google Cloud Platform project applies to both Cloud Datastore and App Engine.
App Engine is a regional resource, though.
For this project, the command
gcloud app describe
will return
locationId: europe-west
According to App Engine Locations, europe-west represents the Belgium region, while Cloud Datastore tells me europe-west is the multi-regional location in Europe. OTOH, Belgium isn't explicitly listed as a (regional) location of Cloud Datastore.
Question
Does locationId: europe-west refer to Belgium and Belgium is also the multi-regional location in Europe (for Cloud Datastore, but not for App Engine)?
Bonus Question
If the assumptions are correct: Does it mean that when the Belgium location is lost that clients could still access Cloud Datastore (as it is replicated to another region), but not the corresponding App Engine app?
For Cloud Datastore, europe-west refers to our Belgium-Finland-Netherlands multi-region (although this may change).
Yes, if the Belgium region is lost you will still be able to read/write from Cloud Datastore from other Cloud Regions - assuming you have a compute layer there.
The long answer to your question is messy.
Here's the short answer: europe-west means different things based on the product. For App Engine, it means Belgium, and for datastore it means multi-region Europe (which does include Belgium, although strangely you cannot choose Belgium as a region otherwise - only London or Frankfurt).
Bonus answer: yes, though if your app is down I don't know how they'd be accessing Cloud Datastore.
Source: Google's table of products available by region.

Specify Zone for Google Cloud App Engine Flexible Environment

Question:
Is there a way to Specify Zone for Google Cloud App Engine Flexible Environment to reside in? If not, what are the alternatives?
Context:
I'm having a setup where I use App Engine to write and reads to Bigtable. However I noticed a performance decrease, and during the debugging, I found a documentation from Google stating:
There are issues with the network connection. Network issues can reduce throughput and cause reads and writes to take longer than usual. In particular, you'll see issues if your clients are not running in the same zone as your Cloud Bigtable cluster.
In my case, my client is in a different region, by moving it to the same region had a huge increase in performance. However the performance issue still exist, and the recommendation from the documentation is to put client in the same zone as Bigtable.
I also considered using Container engine or Compute Engine where it is easier to specify the zone, but I want stay with App Engine for its autoscale functionality and managed services.
App Engine is a regional service:
App Engine is regional, which means the infrastructure that runs your
apps is located in a specific region and is managed by Google to be
redundantly available across all the zones within that region.
Taken from here.
You could indeed use GKE or GCE, while you're correct that these are not managed services like App Engine is, they do both support autoscaling.

Allowing an App Engine app to access another App Engine app's datastore

I have a situation where an existing GAE App (let's call it app A) is running, but for non-technical reasons can't be modified. As users migrates to a new client version, we need to migrate their data from app A to a new GAE app (which I'll call app B).
Is there a way that I can grant app B access to app A's live datastore without modifying app A? My not modifying I mean not having to deploy new code. Changing setting or permissions in the Cloud Console is fine.
In case it matters, both apps that I'm referring to are written in Go.
It might not be possible to share the datastore across multiple GAE apps using the Google App Engine Standard Environment Client Libraries. At least for python it's not possible, donno about go.
But the Cloud Datastore Client Libraries can be used to share a datastore across many apps, even from outside Google Cloud.
Regardless of the particular way the old app accesses the datastore (language/library/etc.) it can be configured from the Cloud Console to allow access to a remote app. The exact procedure steps are captured in How do I use Google datastore for my web app which is NOT hosted in google app engine?
The new app would be using the above-metioned client library with the old app's service account credentials (obtained in the above paragraph procedure) to access the old app's datastore.

I want to choose my own Server and own database in google app engine

I am very newly in google app engine.. There are three Questoins on google app engine and in google app engine i want to choose JAVA language.
Does google app engine provide private cloude ?
I want to deploy my application with my own server( E.x.glassfish or JBoss) on google app engine ?
I want to use my own database instead of cloud SQL in google app engine?
Is it possible or not?
With Google Cloud Appengine - no, it's impossible.
With Google Cloud Instances or Google Cloud Containers - all of this is possible.
Appengine is just one piece of Google Cloud, designed for very specific job, with infrastructure managed by Google. You can only write some code (with lot of restrictions too) that runs inside it. You can read some details about code restritions there: https://cloud.google.com/appengine/docs/java/#Java_The_sandbox
What you're looking for is Google Cloud Instances, that are more standard virtual machines, where you can run anything you want. See https://cloud.google.com/compute/
There is still tools for Load Balancing, Health Check, Centralized Logging for Cloud Instances, and other stuff similar to features provided by Appengine.

How to specify a region for Google App Engine instance?

When authorizing a Cloud SQL instance for an App Engine instance, it is required to have both instances in the same region - this is stated by Google here as below snapshot.
The issue is that we can choose the region for a Cloud SQL instance when creating it, though I'm not sure how we can choose one for creating/uploading an App Engine instance
So the question is, how to specify a region for App Engine instance?
Europe is available for App Engine apps, currently on a limited basis and by request. https://developers.google.com/appengine/docs/location
http://googledevelopers.blogspot.com/2012/12/app-engine-174-released.html
https://docs.google.com/forms/d/1W7LsnYRj0eBAzEQlDtFbsVuIZ0nFU2TaP7cZiaY4Z0Q/viewform?formkey=dDllb3FHLS1IdXVIcjVKR3FScklka1E6MQ
App Engine is just in the United States and Europe for now.
Previously on Stack Overflow: Verify/change application region at Google App Engine Change GAE application location
I came across this question 3.5 years later, and gcloud now supports creating App Engine applications for a project in a particular region:
$ gcloud app create --project=$PROJECTID --region=northamerica-northeast1
Alternatively it can be specified in the Google Cloud Console when creating a project's App Engine component.

Resources