Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use Google App Engine Flex vs Google Cloud Run

I want to deploy containerized code using one of Google's serverless options. From what I understand Google has two options for this:

  1. Google App Engine Flexible Environment
  2. Google Cloud Run (in beta)

I've watched the 2019 Google Next talk Where Should I Run My Code? Choosing From 5+ Compute Options. And I read Jerry101's answer to the general question "What is the difference between Google App Engine and Google Cloud Run?".

To me it basically sounds like Cloud Run is the answer to the limitations of using Google App Engine Flexible Environment.

The reasons I can think of to choose App Engine Flexible Environment over Cloud Run are:

  • Legacy - if your code currently relies on App Engine Flex you might not want to deal with moving it
  • Track record - App Engine Flex has been around for a while in general availability and in that sense has a track record, whereas Cloud Run is just in Beta

But those are both operation type considerations. Neither is a concern for me. Is there a technical advantage to choosing App Engine Flex over Cloud Run?

Thanks

Note: The beta Serverless VPC Access for App Engine is only available for the standard environment as of this question posting April 2019, not for Flex, so that's not a consideration in the question of App Engine Flex vs Cloud Run

like image 863
hlp Avatar asked Apr 15 '19 19:04

hlp


People also ask

Should I use cloud run or App Engine?

Cloud Run vs App Engine vs Cloud FunctionsIf you need a serverless option that needs an application to run in a stateless container, Cloud Run may be the best choice for this kind of deployment. It is fully managed, and the pricing is based only on resources consumed.

When should I use App Engine and cloud run?

If you just want to code up your HTTP-based application and leave the scalability and deployment of the app to Google Cloud then App Engine — a serverless, fully-managed option that is designed for hosting and running web applications — is a good option for you.

Is Google App Engine and Google Cloud same?

Google App Engine and Google Cloud Platform are primarily classified as "Platform as a Service" and "Cloud Hosting" tools respectively. Snapchat, Accenture, and Movielala are some of the popular companies that use Google App Engine, whereas Google Cloud Platform is used by Sentry, WePay, and BetterCloud.

What are the advantages of using App Engine flexible environment?

App Engine allows developers to focus on what they do best: writing code. Based on Compute Engine, the App Engine flexible environment automatically scales your app up and down while also balancing the load.


1 Answers

Pricing/Autoscaling: The pricing model between GAE Flexible Environment and Cloud Run are a bit different.

  • In GAE Flexible, you are always running at least 1 instance at any time. So even if your app is not getting any requests, you’re paying for that instance. Billing granularity is 1 minute.
  • In Cloud Run, you are only paying when you are processing requests, and the billing granularity is 0.1 second. See here for an explanation of the Cloud Run billing model.

Underlying infrastructure: Since GAE Flexible is running on VMs, it is a bit slower than Cloud Run to deploy a new revision of your app, and scale up. Cloud Run deployments are faster.

Portability: Cloud Run uses the open source Knative API and its container contract. This gives you flexibility and freedom to a greater extent. If you wanted to run the same workload on an infra you manage (such as GKE), you could do it with "Cloud Run on GKE".

like image 140
ahmet alp balkan Avatar answered Oct 04 '22 22:10

ahmet alp balkan