Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine Standard or Flexible environment?

I am stuck in deciding between choosing Google App Engine Standard Vs. Flexible environment for a real world production. I want to use Java definitely. Need to use Firebase(latest version) for Authentication and Push notification; I'm not sure whether new Firebase is compatible with standard or flexible.

per the caution note in the following link, my impression is that recent Firebase is compatible is with Flexible Environment only.

https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio

like image 743
EhsanR Avatar asked Aug 01 '16 05:08

EhsanR


People also ask

Which programming environment is used for Google App Engine?

The App Engine standard environment is based on container instances running on Google's infrastructure. Containers are preconfigured with one of several available runtimes. The standard environment makes it easy to build and deploy an application that runs reliably even under heavy load and with large amounts of data.

What are the advantages of using App Engine flexible environment instead of standard environment?

Application Execution As Flexible environment supports docker it can support custom runtime or source code written in other programming languages. Allows selection of any Compute Engine machine type for instances so that the application has access to more memory and CPU.

Is Google App Engine applications run in secure sandbox environment?

Google App Engine (often referred to as GAE or simply App Engine) is a cloud computing platform as a service for developing and hosting web applications in Google-managed data centers. Applications are sandboxed and run across multiple servers.

What sort of application environment is provided by Google App Engine Mcq?

Google App Engine (GAE) is a platform-as-a-service product that provides web app developers and enterprises with access to Google's scalable hosting and tier 1 internet service. GAE requires that applications be written in Java or Python, store data in Google Bigtable and use the Google query language.


2 Answers

All things being equal any standard environment app can also run in a flexible environment with minimal app changes. The reverse is not true - the standard environment restrictions are stricter than those for the flexible environment (hence the flexible in its name).

UPDATE: the above is not correct, the language specific section of the Migrating an Existing App Engine App guide should be checked for which standard env APIs are explicitly listed as compatible or incompatible. In some cases that could clarify the decision right away. Assuming for the remaining of the answer that the choice between environments remains open after this check.

So - to get unstuck - I'd initially shoot for the standard environment (simpler to setup/manage and also potentially free, depending on the app's usage) and only decide to switch to flexible-only env if/when I hit an unavoidable issue caused by one of a standard environment restrictions and which is not an issue in the flex environment. If no such issue is hit you practically maintain the option to switch between the 2 deployment options as you desire.

As for your impression from the tutorial doc - I think it's unfounded, based on the Costs section...

Both Firebase and App Engine have free levels of usage. If your usage of these services is less than the limits specified in the Firebase free plan and the App Engine free quota, there is no charge for doing this tutorial.

... in combination with the Pricing row Comparing environments table...

enter image description here

... as the standard env has a free daily Instance hours quota but the Compute Engine Pricing uses the Machine type billing model and doesn't have a free quota except for the initial limited free trial.

Which overall tells me that the standard environment is used in the tutorial :)

Confirmed in the Configuring the App Engine backend to use manual scaling section as the app's config doesn't have the <vm>true</vm> setting used to select the flexible environment.

like image 156
Dan Cornilescu Avatar answered Sep 29 '22 19:09

Dan Cornilescu


Your preference should be app engine standard environment for the time being, unless you specifically need a feature only offered in flexible. Currently, there is very little documentation to go with Flexible app engine, and converting nearly any app from one to the other is NOT a simple task.

Anything you read that says "its easy to convert from standard to flexible" or vice versa is from BEFORE december 6'th, when vm:true was deprecated (along with all of the compat runtimes which let you use standard code on flexible app engine). Flexible now has it's own libraries for most things, and it's different enough to require nearly a complete re-write of many of your methods.

For example, when I converted my cloud storage controller to flexible, not a single line of code was useful beyond method names as the new library primarily utilizes Blobs instead of StorageObjects. (java)

like image 36
KevinG Avatar answered Sep 29 '22 17:09

KevinG