Last updated on June 16th, 2021
“Serverless’ is the new industry darling. To fulfill the enterprises’ need to accelerate the speed of development and deployment, serverless computing has exploded on the enterprise scene. Serverless computing essentially is an execution model for the cloud where the cloud provider dynamically allocates compute resources and storage and takes care of the servers on behalf of the customers. In the context of the folks building software, the heavy lifting of the hardware or the OS that the code runs on is handled by a cloud service provider.
In serverless, the cloud provider manages the server infrastructure all the way to the application layer. The developers’ only focus is on the application code and business logic – nothing else. This includes elements like message queues, databases, stream processing, and other systems and extends beyond pure compute alone.
The attraction towards serverless is clear and undeniable. It’s also understandable given the option to focus on building products without worrying or focusing on infrastructure management, and with automatic scaling, greater fault tolerance across multiple data centers and in some cases, even globally, and the economies of scale.
Say hello to GCP – Google Cloud Platform
One of the platforms making serverless a reality is Google Cloud’s serverless platform. The Google Cloud Platform (GCP) helps enterprises build, develop, and deploy applications and functions as containers or source code and eliminates the need for infrastructure management; thereby simplifying developer experience.
The GCP option provides software enterprises all the benefits of serverless that we have spoken of. It additionally provides the enterprise access to Google’s operational expertise and inherent experience of their army of Site Reliability Engineers (SREs). That for most enterprises is a lot of leverage.
From the minimally managed VM’s to highly managed serverless backends, GCP offers a comprehensive set of compute options.
Firebase – Firebase acts as the Backend-as-a-Service (BaaS) platform and enables enterprises to build mobile and web applications with minimal server-side code. prototype applications and build a proof of concept with minimal investment. Obviously, Firebase helps organizations focus on development without worrying about infrastructure.
Cloud Function – Cloud Function is another option in the GCP that acts like a Functions-as-a-Service (FaaS) offering. This offering allows organizations to upload function codes and gets Cloud Functions to manage the runtime.
While this sandboxed environment puts in some runtime restrictions, it is still a great option to build event-driven services. It is also good when enterprises need to connect systems together or even when enterprises need to move data between services or react to log events.
However, while this works for basic user-facing APIs, the operational tooling in Cloud Functions is not particularly well-suited for operationally complex products.
App Engine – App Engine bring to the enterprise the Platform-as-a-Service (PaaS) function. App Engine is a fully managed runtime and allows enterprises to upload application code while managing the operational aspects such as autoscaling and fault-tolerance. It offers two modes, i.e., Standard and Flexible.
The Standard mode is the opinionated PaaS runtime while the Flexible mode employs a custom runtime using a container. The App Engine is a reliable choice for stateless applications with quick instance start-up times. It also simplifies operational aspects by making it easier to deploy and manage large components.
Cloud Run – Cloud Run is quite similar to App Engine Flex (Flexible mode) except for some nuances. Cloud Run has a very fast instance start-up time since it relies on gVisor container runtime.
While Flex does not boast of this feature, however, it does provide additional features such as deployment rollbacks, traffic splitting, VPC connections, etc. making it, perhaps, more feature-rich than Cloud Run.
Given its design, Cloud Run is a good fit for easily containerized stateless services, event-driven applications and systems, and applications that have custom systems and language dependencies. It is not extremely well-suited for highly stateful systems or when compliance needs to demand strict control over the low-level environment and infrastructure.
Google’s Cloud Platform also provides access to the Kubernetes Engine and the Cloud Engine as lower-level abstraction layers.
Kubernetes Engine – Kubernetes Engine is Google’s managed Kubernetes service and provides a container orchestration layer over the GCE. This is perhaps the lowest level of abstraction most modern applications need.
Compute Engine – Compute Engine (GCE) is the VM offering of Google. These GCE VMs run on multi-tenant hosts. However, GCE offers sole-tenant nodes as well where enterprises get a physical compute engine server dedicated to hosting their individual VM.
In Conclusion
With Cloud Run, App Engine, Cloud Functions, and Firebase as serverless compute options, enterprises have a lot to choose from. However, the choice doesn’t have to be one or the other. The GCP offers enterprises the flexibility to use a combination of these services when building their system.
The advantage of going serverless is that enterprises can then expend valuable time in creating strategic and business differentiation instead of investing the same in commodity infrastructure and its management. These benefits are immediately available with serverless on GCP. While certain usage levels attract a certain premium, it helps to view this not as operational costs but as opportunity costs that can bring tremendous benefits to the enterprise by freeing up resources to focus on strategic initiatives.