Choosing an App Engine Environment

You can run an App Engine application in two environments, the standard environment and the flexible environment. You can use both environments in your application at the same time if you structure your application using the microservices architecture.

Comparing environments

The following table summarizes the differences between the two environments:

Feature Standard environment Flexible environment
Instance startup time Milliseconds Minutes
Maximum request timeout 60 seconds 60 minutes
Background threads Yes, with restrictions Yes
Background processes No Yes
SSH debugging No Yes
Scaling Manual, Basic, Automatic Manual, Automatic
Writing to local disk No Yes, ephemeral (disk initialized on each VM startup)
Customizable serving stack No Yes (built by customizing a Dockerfile)
Automatic in-place security patches Yes Yes
Network access Only via App Engine services (includes outbound sockets) Yes
Supports installing third-party binaries No Yes
Location North America, Asia Pacific, or Europe North America or Asia Pacific. The flexible environment is not supported in Europe.
Pricing Based on instance hours Based on usage of vCPU, memory, and persistent disks

Flexible environment versus Compute Engine

While flexible environment runs services in Compute Engine VM instances, it differs from Compute Engine in the following ways:

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

  • You always have root access to Compute Engine VM instances. SSH access to VM instances in the flexible environment is disabled by default. If you choose, you can enable root access to your app's VM instances.

  • Flexible environment VM instances are automatically located by geographical region according to the settings in your project. Google’s management services will ensure that all the VM instances for a project are co-located for optimal performance.

Migrating between environments

If you have an application in the standard environment, you might want to move some services to the flexible environment. For guidance, see the recommendations for Python, Java, and Go.

To migrate specific services, see the instructions for Python, Java, and Go.

Enviar comentarios sobre...

App Engine Documentation