Choosing an App Engine environment


The App Engine environments

App Engine is well suited to applications that are designed using a microservice architecture, especially if you decide to utilize both environments. Use the following sections to learn and understand which environment best meets your application's needs.

When to choose the standard environment


Applications that need to deal with rapid scaling.

The standard environment is optimal for applications with the following characteristics:

    • Python 2.7, Python 3.7, Python 3.8, Python 3.9
    • Java 8, Java 11
    • Node.js 8, Node.js 10, Node.js 12, and Node.js 14
    • PHP 5.5, PHP 7.2, PHP 7.3, and PHP 7.4
    • Ruby 2.5, Ruby 2.6, and Ruby 2.7
    • Go 1.11, Go 1.12, Go 1.13, Go 1.14, Go 1.15

When to choose the flexible environment

Application instances run within Docker containers on Compute Engine virtual machines (VM).


The flexible environment is optimal for applications with the following characteristics:

  • Uses or depends on frameworks that include native code.
  • Accesses the resources or services of your Google Cloud project that reside in the Compute Engine network.

Comparing high-level features

The following table summarizes the differences between the two environments:

Feature Standard environment Flexible environment
Instance startup time Seconds Minutes
Maximum request timeout Depends on the runtime and type of scaling. 60 minutes
Background threads Yes, with restrictions Yes
Background processes No Yes
SSH debugging No Yes
Scaling Manual, Basic, Automatic Manual, Automatic
Scale to zero Yes No, minimum 1 instance
Writing to local disk
  • Java 8, Java 11, Node.js, Python 3, PHP 7, Ruby, Go 1.11, and Go 1.12+ have read and write access to the /tmp directory.
  • Python 2.7 and PHP 5.5 don't have write access to the disk.
Yes, ephemeral (disk initialized on each VM startup)
Modifying the runtime No Yes (through Dockerfile)
Deployment time Seconds Minutes
Automatic in-place security patches Yes Yes (excludes container image runtime)
Access to Google Cloud APIs & Services such as Cloud Storage, Cloud SQL, Memorystore, Tasks and others. Yes Yes
WebSockets No
Java 8, Python 2, and PHP 5 provide a proprietary Sockets API (beta), but the API is not available in newer standard runtimes.
Supports installing third-party binaries
  • Yes for Java 8, Java 11, Node.js, Python 3, PHP 7, Ruby, Go 1.11, and Go 1.12+.
  • No for Python 2.7 and PHP 5.5.
Pricing Based on instance hours Based on usage of vCPU, memory, and persistent disks


Comparing the flexible environment to Compute Engine

The App Engine flexible environment has the following differences to Compute Engine:

  • Flexible environment VM instances are restarted on a weekly basis. During restarts, Google's management services apply any necessary operating system and security updates.


  • Code deployments can take longer as container images are built by using the Cloud Build service.

  • The geographical region of a flexible environment VM instance is determined by the location that you specify for the App Engine application of your Cloud project. Google's management services ensures that the VM instances are co-located for optimal performance.

Migrating from standard to the flexible environment



Try it for yourself


Try App Engine free