Difference between Google App Engine Flexible and Google Container Engine? - google-app-engine

Specific to Docker based deployment, what are the differences between those two? Since Google App Engine Flexible now also supports Dockerfile based deployment and it is also fully-managed service, seems it's more preferred option rather than configuring Kubernetes deployment on Container Engine, isn't it?
What are the use cases where it's more preferred to use Google Container Engine over App Engine Flexible?

They are different things. App Engine Flexible is focused on application development - i.e. you have an application and you want to be deployed and managed by Google). On the other hand, Kubernetes is more about having your own infrastructure. Obviously, you can also deploy applications in Kubernetes but, as it's your "own" infrastructure, you are the one to directly manage how both the and the application will behave (create services, create scalability policies, RBAC, security policies...).
In this sense, Kubernetes is more flexible in what you can achieve. However, as a developer, you may not be interested in the infrastructure at all, only that your application works and scales. For this kind of profile, App Engine Flexible is more suitable.
If, on the other side, want to manage a complete Container infrastructure (more SRE profile), then Kubernetes is for you.

The main benefit apart from what is mentioned in Javier's answer is that using Kubernetes makes your application portable and independent of the underlying cloud platform. If you ever want to move your application to AWS, Azure, on-prem etc. you can do that with very few changes if you're using Kubernetes, while if you're on App Engine Flex, it'll require a lot more changes.
Another difference is if you want to create lots of different micro-services with complex structure, Kubernetes is more suited to that, instead of App Engine. It's not impossible to implement micro-service architecture in App Engine too. You can certainly use different yaml files, but those doesn't give you a lot of flexibility and any complex application will ultimately need to be ported.
Also, if you want to have stateful containers, you can't do that with App Engine Flex.
Kubernetes being an open-source project has more vibrant community than App Engine. Google is more focused on Kubernetes than App Engine and updates to Kubernetes are more frequent than App Engine.
But that doesn't mean App Engine is any less powerful. I have worked on complex applications serving hundreds of thousands (probably a million now) of users with App Engine (Both standard and flexible environment) and we never thought of migrating it out of GAE. I mean, if it can handle the traffic of Pokemon Go, it can certainly handle your app's too.
Performance wise someone did a comparison here. The summary results are as follows -
An important difference between the services is that App Engine Flex
biases automation to Google’s control whereas Kubernetes Engine
requires more oversight by the customer. Kubernetes Engine is evolving
more rapidly and is adding more powerful automation.
A subtle difference is that Flex uses containers as a means to an end.
Customarily, users of Flex could ignore that containers are being
employed because this is done behind the scenes. Kubernetes
Engine — as the name suggests — is predicated on containers and is
explicitly designed as a tool that facilitates the management of
services built from containers. With Flex, a service is always
n-containers of one type. With Kubernetes Engine, a service comprises
m-pods and the pods may themselves comprise p-containers.
It is practical to migrate an App Engine Flex deployment to GKE
In this case (!) Flex achieved greater throughput than GKE.
The increased velocity appears due to the rapidity with which App Engine
is able to signal auto-scaling events; GKE scales pods promptly
within an existing cluster of nodes but slightly more slowly to scale
up the number of nodes.
App Engine and GKE share fundamental GCP resources including the HTTP/S Load-Balancer service and Managed Infrastructure Groups auto-scaling.
For the same load, using the same VM size (1 vCPU and 1GB RAM): App Engine Flex scaled to 6 containers on 6 instances VMs (1 instance/VM ); GKE scaled to 10 pods (1 container/pod) on 3 VMs (50%).

If you are looking to run your application 24/7, GKE also offers more vCPU and RAM resources at a lower price compared to the App Engine as well. You can further reduce your running cost if you run your applications with preemptible VMs (up to 80% cheaper than regular VMs), on Kubernetes, your app will be restarted with seconds of downtime.
Another advantage of GKE is that you can run multiple applications within the same cluster whereas App Engine charges you per app deployed.
PS: I run multiple sites on a GKE cluster. Doing this on App Engine will cost me a few times more than what I am currently paying.

In addition to what already explained above, both GKE and APP Engine Flexible don't scale to zero. however GKE does come with persistent disks and TPU/GPU access which are not available with APP Engine Flexible.

Related

Why choosing Google Kubernetes Engine instead of Google AppEngine?

As far as I can see, GKE seems to be slighty more complex to configure and deploy an application (using Kubernetes direct files or Helm Charts or something else ?). Furthermore it seems to have no better pod failure detection or better performances ?
Why should we use GKE whereas there is GAE which only needs dispatch.yaml, app.yaml files and gcloud cli to deploy ?
Is there any technical or financial feedback against GAE ?
Finally, how can we make a choice between GKE and GAE ? What whould be the reason to not choose GAE ?
Google Kubernetes Engine(GKE) is a cluster manager and orchestration system for running your Docker containers. Google App Engine(GAE) is basically google managed containers.
They both try to provide you similar main benefits(scalability, redundancy, rollouts, rollbacks, etc.). The main difference is in their philosophy: GKE tries to provide you very fine grained control over everything about your cluster. GAE tries to get you run your apps with as little configuration/management as possible.
With GKE you have more control, but also more work for you. You need to configure the network, security, software updates etc. With GAE you don't need to worry about many of these things, and you can focus on your app.
One overseen benefit of using GKE is to be independent from the cloud provider.
When using kubernetes it is much easier to migrate to another cloud provider or even to a private cloud.
As a rule of thumb, when using a propietary solution you are bound to a cloud provider for good and bad. For example what will you do when your cloud provider decides to deprecate a certain runtime.
When using open source solutions, even when they are managed you are still a free person.
App engine is PaaS where as GKE is CaaS. Below are the comparison among than
Trying to share my thoughts for future visitors
Let me start with the below image and then we will see the OP's questions one-by-one:
As far as I can see, GKE seems to be slighty more complex to configure
and deploy an application (using Kubernetes direct files or Helm
Charts or something else ?).
When you see from the perspective of a client who does not want the overhead of managing the environment - basically a PaaS client - then, yes, Google Kubernetes Engine is slightly more complex as compared to Google App Engine.
As you can see in the above diagram as well - GKE is more towards the left, which it is a less vendor-managed cloud solution, so environment configuration and management overheads are expected.
Furthermore it seems to have no better pod failure detection or better
performances ?
I have not used Google App Engine but I can assure you that Google Kubernetes Engine is a certified Kubernetes (check more over here) so if you are running Kubernetes on Google App Engine, you can be sure that GKE is offering you same performance and features as Google App Engine.
Why should we use GKE whereas there is GAE which only needs
dispatch.yaml, app.yaml files and gcloud cli to deploy ?
As I mentioned in the start and as you can see in the above diagram as well that it is all about control over the environment - the more control you want over your environment, you will select a solution farther on the left side. And please note that more control means more overhead of environment management, and exactly that's the reason why people tend to choose solutions from farther on the right side.
Is there any technical or financial feedback against GAE ?
Both Google Kubernetes Engine and Google App Engine are highly successful and production-grade offerings from Google, so you can be sure about technical aspects. For financial aspects - you need to check their pricing model and see which will go more smoothly in your pockets.
Finally, how can we make a choice between GKE and GAE ? What whould be
the reason to not choose GAE ?
IMHO - the top three decision points could be:
How much you control you want over your environment
More control comes with more self-management, so are you ready to go through the overheads of a self-managed environment
Your budget

Does Google App Engine Flexible environment use only one container on one vm instance?

When I deploy Google App Engine, i see only the parameters to control the no. of min and max vm instances. When i checked inside vms, it hosts only one container on one vm. If it is doing so, i think its a drawback to go for GAE, rather i would prefer going for a vm instance and then create multiple containers myself.
I've tried searching online, but din't get any specific answer to my question if we can have multiple containers on GAE flexible environment or not. Any answers on this will be highly appreciated.
Thanks in advance.
Google App Engine (GAE) Flexible runs only one container per VM and does not support multiple containers at the moment. There was a feature request issued and for now it is not on a roadmap of Google's engineering team. You can track and star this issue here.
The reason for this is that GAE Flexible is intended to be an automatized environment so that you can focus on actual coding while it takes care of scaling and load-balancing in the background for you. If you want to use more than one container you can deploy it as a separate service in the same app. More advanced control and customization can be done using Kubernetes Engine:
Kubernetes Engine allows you to deploy multiple containers and groups
of containers for each VM instance, which can lead more efficient host
VM utilization for microservices with a smaller footprint.
Source: Google docs

How to choose between Google Cloud Functions and Google App Engine?

Google Cloud Functions seems very interesting as it is serverless and zero maintenance solution. But, when is it appropriate to use Google Cloud Functions over Google App Engine?
Update:
As of June 12, 2018, Node.js 8.x is supported in Google App
Engine Standard environment along with the Flexible Environment.
Short answer: It depends upon your need.
Long answer: Here's the checklist
Runtime
Cloud Functions supports only Node.js at the moment and there aren't any plans, as far as I know, to introduce new runtimes there. If you're good with that, you can put Cloud Functions in your options.
App Engine does support Node.js, although it's only available in the Flexible environment. App Engine Standard Environment supports Python 2.7, Java 8, Java 7, PHP 5.5, Go 1.8 and 1.6, while App Engine Flexible Environment supports Python, Java, Node.js, Go, Ruby, PHP, or .NET. You can also provide your own runtime using a dockerfile in Flexible environment. So if you want to develop your application in anything other than Node.js, App Engine is the better option there.
Serverless Architecture
Are you looking for a serverless architecture? Are you frustrated with managing instances and having them scale up or down? Do you want to spend no time to manage your server? Go for Cloud functions if you answer yes to all of these questions.
Are you looking for fine grain control on no. of instances and billing of those. Do you want to have separate versions and want better control of those. Look for App Engine in this case.
Microservice
Can you break your code into smaller independant functions? Go for Cloud Functions.
App Engine do support Microservice architecture using same code base, but different yaml files to split the services, but it's upto you if you want to break them into services or not. We are running all our code into one monolithic application for last few years and it's still working good on App Engine.
Database
Is your app data stored in Firebase? Then Cloud functions can be used easily there. If not, App Engine is the better alternative. App Engine can connect to Firebase too, in case you're wondering.
There're other things to consider too, such as pricing and if you're looking to migrate existing application or if you're writing things from scratch. You can in fact, use both of the options. We are using App Engine (Python) Standard Environment for our application, but we have recently migrated few of our long running tasks on Cloud functions and they are working amazingly.
In my opinion App Engine is the answer to most of the things, where as Cloud Functions are made for specific requirements.
When what you desire is to execute a function (some logic of some sort) in response to an event originated in the cloud and you don't want to build (and be billed for) a full web application for just that.
From Product Overview:
Cloud computing has made possible fully serverless models of computing
where logic can be spun up on-demand in response to events originating
from anywhere. Construct applications from bite-sized business logic
billed to the nearest 100 milliseconds, only while your code is
running. Serve users from zero to planet-scale, all without managing
any infrastructure.
From What are Google Cloud Functions?
Google Cloud Functions is a serverless execution environment for
building and connecting cloud services. With Cloud Functions you write
simple, single-purpose functions that are attached to events emitted
from your cloud infrastructure and services. Your Cloud Function is
triggered when an event being watched is fired. Your code executes in
a fully managed environment. There is no need to provision any
infrastructure or worry about managing any servers.
If you already have a GAE app related to the piece of logic you want to implement it's probably simpler to just do it inside the app :)

What is the equivalent of AWS elastic beanstalk in GCP?

Is Elastic Beanstalk of AWS an answer to GAE of GCP?
Are there any benchmark comparisons between the two?
Is Elastic beanstalk of AWS an answer to GAE of GCP?
Yes, in a nutshell, you can think of it like that.
There's an article by Google showing side-by-side comparisons of AWS and Google Cloud products, listing them as IaaS and PaaS:
Service AWS Google Cloud Platform
-----------------------------------------------------------------
IaaS Amazon Elastic Compute Cloud Compute Engine
PaaS AWS Elastic Beanstalk App Engine
However, it is worth noting that at least AWS Elastic Beanstalk is not strictly a PaaS solution, I would describe it more as a management layer on top of EC2. From their FAQ:
Q: How is AWS Elastic Beanstalk different from existing application containers or platform-as-a-service solutions?
Most existing application containers or platform-as-a-service solutions, while reducing the amount of programming required, significantly diminish developers’ flexibility and control. Developers are forced to live with all the decisions predetermined by the vendor–with little to no opportunity to take back control over various parts of their application’s infrastructure. However, with AWS Elastic Beanstalk, developers retain full control over the AWS resources powering their application. If developers decide they want to manage some (or all) of the elements of their infrastructure, they can do so seamlessly by using Elastic Beanstalk’s management capabilities.
I don't think it's possible to compare these platforms with benchmarks. There is still a lot you can configure on this platforms and performance will mostly depend on your configuration and (even more) your application code.
It comes down to differences in pricing, easy-of-use and the availability of other services on these platforms.

What is the difference between Google App Engine and Google Compute Engine?

I was wondering what the difference between App Engine & Compute Engine are. Can anyone explain the difference to me?
App Engine is a Platform-as-a-Service. It means that you simply deploy your code, and the platform does everything else for you. For example, if your app becomes very successful, App Engine will automatically create more instances to handle the increased volume.
Read more about App Engine
Compute Engine is an Infrastructure-as-a-Service. You have to create and configure your own virtual machine instances. It gives you more flexibility and generally costs much less than App Engine. The drawback is that you have to manage your app and virtual machines yourself.
Read more about Compute Engine
You can mix both App Engine and Compute Engine, if necessary. They both work well with the other parts of the Google Cloud Platform.
EDIT (May 2016):
One more important distinction: projects running on App Engine can scale down to zero instances if no requests are coming in. This is extremely useful at the development stage as you can go for weeks without going over the generous free quota of instance-hours. Flexible runtime (i.e. "managed VMs") require at least one instance to run constantly.
EDIT (April 2017):
Cloud Functions (currently in beta) is the next level up from App Engine in terms of abstraction - no instances! It allows developers to deploy bite-size pieces of code that execute in response to different events, which may include HTTP requests, changes in Cloud Storage, etc.
The biggest difference with App Engine is that functions are priced per 100 milliseconds, while App Engine's instances shut down only after 15 minutes of inactivity. Another advantage is that Cloud Functions execute immediately, while a call to App Engine may require a new instance - and cold-starting a new instance may take a few seconds or longer (depending on runtime and your code).
This makes Cloud Functions ideal for (a) rare calls - no need to keep an instance live just in case something happens, (b) rapidly changing loads where instances are often spinning and shutting down, and possibly more use cases.
Read more about Cloud Functions
Basic difference is that Google App Engine (GAE) is a Platform as a Service (PaaS) whereas Google Compute Engine (GCE) is an Infrastructure as a Service (IaaS).
To run your application in GAE you just need to write your code and deploy it into GAE, no other headache. Since GAE is fully scalable, it will automatically acquire more instances in case the traffic goes higher and decrease the instances when traffic decreases. You will be charged for the resources you really use, I mean, you will be billed for the Instance-Hours, Transferred Data, Storage etc your app really used. But the restriction is, you can create your application in only Python, PHP, Java, NodeJS, .NET, Ruby and **Go.
On the other hand, GCE provides you full infrastructure in the form of Virtual Machine. You have complete control over those VMs' environment and runtime as you can write or install any program there. Actually GCE is the way to use Google Data Centers virtually. In GCE you have to manually configure your infrastructure to handle scalability by using Load Balancer.
Both GAE and GCE are part of Google Cloud Platform.
Update: In March 2014 Google announced a new service under App Engine named Managed Virtual Machine. Managed VMs offers app engine applications a bit more flexibility over app platform, CPU and memory options. Like GCE you can create a custom runtime environment in these VMs for app engine application. Actually Managed VMs of App Engine blurs the frontier between IAAS and PAAS to some extent.
To put it simply: compute engine gives you a server which you have full control/responsibility for. You have direct access to the operating system, and you install all the software that you want, which is usually a web server, database, etc...
In app engine you don't manage the operating system of any of the underlying software. You only upload code (Java, PHP, Python, or Go) and voila - it just runs...
App engine saves tons of headache, especially for inexperienced people but it has 2 significant drawbacks:
1. more expensive (but it does have a free quota which compute engine doesn't)
2. you have less control, thus certain things are just not possible, or only possible in one specific way (for example saving and writing files).
Or to make it even simpler (since at times we fail to differentiate between GAE Standard and GAE Flex):
Compute Engine is analogous to a virtual PC, where you'd deploy a small website + database, for instance. You manage everything, including control of installed disk drives. If you deploy a website, you're in charge of setting up DNS etc.
Google App Engine (Standard) is like a read-only sandboxed folder where you upload code to execute from and don't worry about the rest (yes: read-only - there are a fixed set of libraries installed for you and you cannot deploy 3rd party libraries at will). DNS / Sub-domains etc are so much easier to map.
Google App Engine (Flexible) is in fact like a whole file system (not just a locked down folder), where you have more power than the Standard engine, e.g. you have read/write permissions, (but less compared to a Compute Engine). In the GAE standard, you have a fixed set of libraries installed for you and you cannot deploy 3rd party libraries at will. In the Flexible environment, you can install whatever library your app depends on, including custom build environments (such as Python 3).
Although GAE Standard is very cumbersome to deal with (although Google makes it sound simple), it scales really well when put under pressure. It's cumbersome because you need to test and ensure compatibility with the locked-down environment and ensure any 3rd party library you use does not use any other 3rd party library you're unaware of which may not work on GAE standard. It takes longer to set it up in practice but can be more rewarding in the long run for simple deployments.
In addition to the App Engine vs Compute Engine notes above the list here also includes a comparison with Google Kubernete Engine and some notes based on experience with a wide range of apps from small to very large. For more points see the Google Cloud Platform documentation high level description of features in App Engine Standard and Flex on the page Choosing an App Engine Environment. For another comparison of deployment of App Engine and Kubernetes see the post by Daz Wilkin App Engine Flex or Kubernetes Engine.
App Engine Standard
Pros
Very economical for low traffic apps in terms of direct costs and
also the cost of maintaining the app.
Auto scaling is fast. Autoscaling in App Engine is based on
lightweight instance classes F1-F4.
Version management and traffic splitting are fast and convenient. These features are built into App Engine (both Standard and Flex) natively.
Minimal management, developers need focus only on their app.
Developers do not need to worry about managing VMs in a reliable, as
in GCE, or learning about clusters, as with GKE.
Access to Datastore is fast. When App Engine was first released, the runtime was co-located with Datastore. Later Datastore was split out
as the standalone product Cloud Datastore but the co-location of App Engine Standard serving with Datastore remains.
Access to Memcache is supported.
The App Engine sandbox is very secure. Compared with development on
GCE or other virtual machines, where you need to do your own
diligence to prevent the virtual machine from being taken over at the
operating system level, the App Engine Standard sandbox is relatively
secure by default.
Cons
Generally more constrained than other environments Instances are
smaller. Although this is good for rapid autoscaling, many apps can
benefit from larger instances, such as GCE instance sizes up to 96
cores.
Networking is not integrated with GCE
Cannot put App Engine behind a Google Cloud Load Balancer. Limited to
supported runtimes: Python 2.7, Java 7 and 8, Go 1.6-1.9, and PHP
5.5. In Java, there is some support for Servlets but not the full J2EE standard.
App Engine Flex
Pros
Can use a custom runtime
Native integration with GCE networking
Version and traffic management is convenient, same as Standard
The larger instance sizes may be more suitable to to large complex applications, especially Java applications that can use a lot of memory
Cons
Network integration is not perfect - no integration with internal load balancers or Shared Virtual Private Clouds
Access to managed Memcache not generally available
Google Kubernetes Engine
Pros
Native integration with containers allows custom runtimes and greater
control over cluster configuration.
Embodies many best practices working with virtual machines, such as immutable runtime environments and easy ability to roll back to previous versions
Provides a consistent and repeatable deployment framework
Based on open standards, notably Kubernetes, for portability between clouds and on-premises.
Version management can accomplished with Docker containers and the
Google Container Registry
Cons
Traffic splitting and management is do-it-yourself, possibly
leveraging Istio and Envoy
Some management overhead
Some time to ramp up on Kubernetes concepts, such as pods, deployments, services, ingress, and namespaces
Need to expose some public IPs unless using Private Clusters, now in beta, eliminate that need but you still need to provide access to
locations where kubectl commands will be run from.
Monitoring integration not perfect
While L3 internal load balancing is supported natively on Kubernetes Engine, L7 internal load balancing is do-it-yourself, possibly leveraging Envoy
Compute Engine
Pros
Easy to ramp up - no need to ramp up on Kubernetes or App Engine,
just reuse whatever you know from previous experience. This is
probably the main reason for using Compute Engine directly.
Complete control - you can leverage many Compute Engine features
directly and install the latest of all your favorite stuff to stay on
the bleeding edge.
No need for public IPs. Some legacy software may be too hard to lock
down if anything is exposed on public IPs.
You can leverage the Container-Optimized OS for running Docker
containers
Cons
Mostly do-it-yourself, which can be challenging to do adequately for
reliability and security, although you can reuse solutions from
various places, including the Cloud Launcher.
More management overhead. There are many management tools for Compute Engine but they will not necessarily understand how you have deployed your application, like the App Engine and Kubernetes Engine monitoring tools do
Autoscaling is based on GCE instances, which can be slower than App
Engine
Tendency is to install software on snowflake GCE instances, which can
be some effort to maintain
As explained already Google Compute Engine (GCE) is the Infrastructure as a service (IaaS) while Google App Engine (GAE) is Platform as a Service (PaaS). You can check the following diagram to understand the difference in a better way (Taken from and better explained here) -
Google Compute Engine
GCE is an important service provided from Google Cloud Platform (GCP) since most of the GCP services use GCE instances (VMs) beneath the management layer (not sure which one don't). This includes App Engine, Cloud Functions, Kubernetes Engine (Earlier Container Engine), Cloud SQL, etc. GCE instances are the most customisable unit there and thus should only be used when your application can't run on any other GCP services. Most of the time people use GCE to transfer their On-Prem applications to GCP, since it requires minimal changes. Later, they can choose to use other GCP services for separate component of their apps.
Google App Engine
GAE is the first service offered by GCP (Long before Google came to the cloud business). It autoscales from 0 to unlimited instances (It uses GCE underneath). It comes with 2 flavors Standard Environment and Flexible Environment.
Standard Environment is really fast, scales down to 0 instance when no-one is using your app, scales up and down in seconds and have dedicated Google services and libraries for caching, authentication etc. The caveat with Standard environment is that it is very restrictive since it runs in a sandbox. You have to use managed runtimes for specific programming languages only. The recent additions are Node.js (8.x) and Python 3.x. The older runtimes are available for Go, PHP, Python 2.7, Java etc.
Flexible Environment is more open as it allows you to use custom runtimes as it uses docker containers. Thus if your runtime is not available in the provided runtimes, you can always create your own dockerfile for the execution environment. The caveat with it is, it requires having at least 1 instance running, even if no-one is using your app, plus the scaling up and down requires few minutes.
Don't confuse GAE flexible with Kubernetes Engine, as the later one uses actual Kubernetes and provides much more customisation and features. GAE Flex is useful when you want stateless containers and your application rely on HTTP or HTTPS protocols only. For other protocols Kubernetes Engine (GKE) or GCE is your only choice. Check my other answer for better explanation.
If you're familiar with other popular services:
Google Compute Engine -> AWS EC2
Google App Engine -> Heroku or AWS Elastic Beanstalk
Google Cloud Functions -> AWS Lambda Functions
I'll explain it in a way that made sense to me:
Compute Engine: If you are do-it-yourself person or have an IT team and you just want to rent a computer on cloud that has specific OS (for example linux), you go for the Compute Engine. You have to do everything by yourself.
App Engine: If you are (for example) a python programmer and you want to rent a pre-configured computer on cloud that has Linux with a running web-server and the latest python 3 with necessary modules and some plug-ins to integrate with other external services, you go for the App Engine.
Serverless Container (Cloud Run): If you would like to deploy the exact image of your local setup environment (for example: python 3.7+flask+sklearn) but you do not want to deal with server, scaling, etc. You create a container on your local machine (through docker) and then deploy it to Google Run.
Serverless Microservice (Cloud Functions): If you want to write bunch of APIs (functions) that do specific job, you go for google Cloud Functions. You just focus on those specific functions, the rest of the job (server, maintenance, scaling, etc.) is done for you in order to expose your functions as microservices.
As you go deeper, you lose some flexibility but you are not worried about unnecessary technical aspects. You also pay a little more but you save time and cost (IT part): someone else (google) is doing it for you.
If you want to not care about load balancing, scaling, etc., it is crucial to split your app to bunch of "stateless" web services that writes anything persistent in a separate storage (database or blob storage). Then you will found how awesome is Cloud Run and Cloud Functions.
Personally, I found Google Cloud Run an awesome solution, absolute freedom in development (as long as stateless), expose it as a web service, docker your solution, deploy it with Cloud Run. Let google be your IT and DevOps, you do not need to care about scaling and maintenance.
I have tried all other options and each one is good for different purpose but Google Run is just awesome. To me, it is the real serverless without losing flexibility in development.
Google Compute Engine (GCE)
Virtual Machines (VMs) hosted in the cloud. Before the cloud, these were often called Virtual Private Servers (VPS). You'd use these the same way you'd use a physical server, where you install and configure the operating system, install your application, install the database, keep the OS up-to-date, etc. This is known as Infrastructure-as-a-Service (IaaS).
VMs are most useful when you have an existing application running on a VM or server in your datacenter, and want to easily migrate it to GCP.
Google App Engine
App Engine hosts and runs your code, without requiring you to deal with the operating system, networking, and many of the other things you'd have to manage with a physical server or VM. Think of it as a runtime, which can automatically deploy, version, and scale your application. This is called Platform-as-a-Service (PaaS).
App Engine is most useful when you want automated deployment and automated scaling of your application. Unless your application requires custom OS configuration, App Engine is often advantageous over configuring and managing VMs by hand.
App Engine gives developers the ability to control Google Compute Engine cores, as well as provide a web-facing front end for Google Compute Engine data processing applications.
On the other hand, Compute Engine offers direct and complete operating system management of your virtual machines. To present your App, you're going to need resources, and Google Cloud Storage is ideal for storing your assets and data, whatever they're used for. You get fast data access with hosting around the globe. Reliability is guaranteed at a 99.95% up-time, and Google also provides the ability to back up and restore your data, and believe it or not, storage is unlimited.
You can manage your assets with Google Cloud Storage, storing, retrieving, displaying, and deleting them. You can also quickly read and write to flat datasheets that are kept in Cloud Storage. Next in the Google Cloud lineup is BigQuery. With BigQuery, you can analyze massive amounts of data, we're talking millions of records, within seconds. Access is handled via a straightforward UI, or a Representational State Transfer, or REST interface.
Data storage is, as you might suspect, not a problem, and scales to hundreds of TB. BigQuery is accessible via a host of client libraries, including those for Java, .NET, Python, Go, Ruby, PHP, and Javascript. A SQL-like syntax called NoSQL is available which can be accessed through these client libraries, or through a web user interface. Finally, let's talk about the Google Cloud platform database options, Cloud SQL and Cloud Datastore.
There is a major difference. Cloud SQL is for relational databases, primarily MySQL, whereas Cloud Datastore is for non-relational databases using noSQL. With Cloud SQL, you have the choice of either hosting in the US, Europe, or Asia, with 100 GB of storage, and 16 GB of RAM per database instance.
Cloud Datastore is available at no charge for up to 50 K read/write instructions per month and 1 GB of data stored also per month. There is a fee if you exceed these quotas, however. App Engine can also work with other lesser known, more targeted members of the Google Cloud platform, including the Cloud Endpoints for creating API backends, Google Prediction API for data analysis and trend forecasting, or the Google Translate API, for multilingual output.
While you can do a fair amount with App Engine on its own, It's potential skyrockets when you factor in its ability to work easily and efficiently with its fellow Google Cloud platform services.
The cloud services provides a range of options from fully managed to less managed services. Less managed services gives more control to the developers. The same is the difference in Compute and App engine also. The below image elaborate more on this point
App Engine is a virtual server.
Compute Engine - it's like a full server.

Resources