Cloud Run vs App Engine

Should you use Google’s Cloud Run or Google’s App Engine for your next project?

Dirk Hoekstra
Dec 29, 2019 · 2 min read
Clouds — Photo by Kaushik Panchal on Unsplash

What is Cloud Run?

In a nutshell, you give Google’s Cloud Run a Docker container containing a webserver. Google will run this container and create an HTTP endpoint.

To deploy to the Google Cloud you should build a Docker container image on your local machine. Then, you should upload this container to Google Cloud.

And finally, you can deploy the pushed container with the following command.

All the scaling is automatically done for you by Google. This sounds great, but there’s a catch.

Cloud Run depends on the fact that your application should be stateless. This is because Google will spin up multiple instances of your app to scale it dynamically.

If you want to host a traditional web application this means that you should divide it up into a stateless API and a frontend app.

What is App Engine?

With Google’s App Engine you tell Google how your app should be run. The App Engine will create and run a container from these instructions.

For example, to host a Node project on Google’s App Engine, I can simply create the following app.yml file.

To deploy it to the App Engine I can run the following command.

The App Engine will build a Docker Image with the nodejs12 environment and run the entrypoint command.

Similarly to Cloud run, your application should once again be stateless.

Which service should you use?

Deploying with App Engine is super easy. You simply fill out an app.yml file and Google handles everything for you.

However, with Cloud Run, you have more control. You can go crazy and build a ridiculous custom Docker image, no problem!

In my opinion, Cloud Run is made for devops engineers, App Engine is made for developers.


A place for practical programming articles!

Dirk Hoekstra

Written by

Practical programmer that likes building cool stuff!



A place for practical programming articles!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade