Google App Engine

Google App Engine vs Cloud Run: Which Should You Use?

App Engine or Cloud Run? Compare runtimes, scaling, billing, and limits, and learn which one fits your app's traffic pattern and team skills.

On this page
  1. What each one is
  2. Key differences
  3. Scaling, cold starts, and CPU
  4. Pricing
  5. Moving from App Engine to Cloud Run
  6. When App Engine is a good fit
  7. When Cloud Run is a good fit
  8. Common misconceptions
  9. Next steps

For a new serverless web app or API, Google recommends Cloud Run. It runs any container, scales to zero, and offers more flexibility than App Engine. App Engine is still supported, and it remains a reasonable choice if you already run an app on it or want the code-first Standard environment, where you deploy source code on a supported runtime.

What each one is

App Engine is a platform as a service that dates to 2008. You deploy code to a supported runtime, or a container to the Flexible environment, and describe the app in app.yaml. Each App Engine application belongs to one region.

Cloud Run is a serverless platform for stateless containers. It became generally available in November 2019 and is built on the Knative API. You can deploy a container image, or deploy source code and let Cloud Run build it with buildpacks. Services in the same project can run in different regions.

Key differences

Area App Engine Cloud Run
Deployment Source code with app.yaml (Standard); container with a Dockerfile (Flexible) Container image, or source built with buildpacks
Languages Supported runtimes (Standard), or any language in a container (Flexible) Any language or binary that runs in a container
Regions One region per app, chosen at creation Services in one project can use different regions
Scale to zero Standard: yes. Flexible: no Yes
Concurrency per instance Standard default 10 (max_concurrent_requests) Default 80, maximum 1,000
Request timeout 10 minutes (Standard, automatic scaling); 60 minutes (Flexible) 5 minutes by default, up to 60 minutes
Largest instance About 3 GB of memory on Standard’s largest class Up to 8 vCPUs and 32 GiB of memory
GPUs and jobs Not offered Offered
Sidecar containers Flexible only Offered
Static files Standard can serve them with handlers, without using instance time No handler option; serve from Cloud Storage or the app
Bundled legacy services Some on Java, Python, Go, and PHP Not available
Billing Instance-hours by instance class Per request-time, or per instance-time if you choose instance-based billing
Free tier 28 F-instance hours, 9 B-instance hours, and 1 GB outbound per day 2 million requests, 180,000 vCPU-seconds, and 360,000 GiB-seconds per month

Scaling, cold starts, and CPU

Both platforms scale automatically, and both can have cold starts. Cloud Run is tuned for fast scaling and a small set of settings. You can keep instances warm with a minimum instance count, and App Engine has the equivalent min_instances setting.

CPU allocation differs. App Engine Standard keeps the CPU available to your instance. Cloud Run, by default, allocates CPU only while it handles a request. If your app runs background threads between requests, use instance-based billing on Cloud Run so those threads are not paused.

Pricing

App Engine bills instance-hours by class, after a daily free quota on Standard. Standard instances do not receive sustained-use or committed-use discounts.

Cloud Run bills for resources used during requests when you use request-based billing, or for the instance’s lifetime when you use instance-based billing. Cloud Run is eligible for committed-use discounts. Cost depends on your traffic pattern in both cases, so estimate with real numbers. The pricing guide explains the App Engine side in more detail.

Moving from App Engine to Cloud Run

Google’s migration guide maps App Engine settings to Cloud Run settings. A few changes matter most:

  • Minimum and maximum instances move to service-level settings in Cloud Run. Cloud Run enforces the lower of the service and revision limits.
  • Concurrency can start at Cloud Run’s default of 80, then be reduced after load testing. Keeping App Engine’s value of 10 is the safer option, but it can leave Cloud Run instances underused and increase cost.
  • Settings behave differently on redeploy. App Engine resets unspecified settings to defaults when you deploy. Cloud Run keeps the previous revision’s settings unless you change them.
  • Static files need a new home. Standard can serve them through handlers. On Cloud Run, serve them from Cloud Storage or from the app itself.
  • Public access requires --allow-unauthenticated at deploy time, or an IAM binding that grants allUsers the Cloud Run Invoker role.
  • Legacy bundled services need replacements. Memcache maps to Memorystore, Task Queues to Cloud Tasks, and cron jobs to Cloud Scheduler.

When App Engine is a good fit

  • You already run an app on App Engine, and it works well.
  • Your app is a simple web app or API on a supported runtime, and you want to deploy source code without writing a Dockerfile.
  • Your app is small enough to stay within the Standard free quota.
  • Your team already uses app.yaml, traffic splitting, and other App Engine tooling.

When Cloud Run is a good fit

  • You are starting a new project.
  • You need a custom container, system libraries, GPUs, or Cloud Run jobs.
  • You want services in several regions within one project.
  • Your traffic is highly variable, and you want instances to scale down to zero.

Common misconceptions

  • “App Engine is deprecated.” It is still supported. Google recommends Cloud Run for new serverless apps.
  • “Cloud Run requires a Dockerfile.” Source deployments build your code with buildpacks.
  • “Cloud Run is only for microservices.” Full web apps run there too. Its filesystem is in memory, so plan for that.
  • “Cloud Run has no cold starts.” It has them. Set a minimum instance count if you need to avoid them.

Next steps

If you are starting with App Engine, the tutorial walks through a first deployment. For a Python web app, the Flask deployment guide covers the full workflow. To decide between App Engine’s environments, read the Standard vs Flexible comparison. If you are comparing with AWS, the Elastic Beanstalk comparison covers a different kind of managed deployment.

The complete guide to google app engine

Google App Engine Tutorial for Beginners
Read the guide

Keep exploring

Guides from other topics

All topics →