In my previous blog, Rethinking Virtualization: Containers in the Data Center, I discuss how traditional server virtualization is really nothing more than hardware virtualization. I also discuss how containers are a better approach to virtualization, by separating the hardware from the application. Serverless computing removes application dependency on the hardware and the operating system. Containers increase portability by ensuring that applications are not hindered by, or tied to, specific hardware, however, the applications are still tied to a specific operating system. In this blog post I’ll provide a brief introduction to serverless computing, what it is, and its dependency on containers.
Ditching the Hardware
While serverless computing may suggest that hardware is no longer needed for an application to run, that’s not the case. Serverless computing simply means that our traditional concept of a server no longer applies. Server hardware, storage, and networking are still required for serverless applications to run, but how those resources are utilized differs.
In a traditional server environment, physical or virtual, we have dedicated server hardware (VMs or physical servers). Each server has a specific application or role to service. For example, if there are 20 VMs, it is likely that each of these VMs is dedicated to a specific application. In a serverless environment, there are no dedicated VMs or physical servers whose sole purpose is to service a specific application. Instead, a pool of OS agnostic resources (servers, storage, networking) is used (upon application execution) to run the application.
Serverless computing gives organizations the ability to ditch dedicated hardware. Presently, serverless computing is reserved for cloud infrastructures. In the future serverless computing may be a viable option in a hybrid cloud environment too.
The concept of serverless computing is simple. For instance, with AWS Lambda, an application or code is developed in the cloud or uploaded to the cloud. The serverless computing infrastructure of the cloud provider analyzes the code (upon execution) and spins up the required resources to support the application. Another example of serverless computing is a database service, such as AWS DynamoDB. AWS’s DynamoDB allows customers to deploy databases in seconds, without having to worry about the underlying hardware or operating system. Serverless computing allows organizations to focus on the application without having to spend cycles on resource allocation, server management, etc. Services like AWS Lambda or DynamoDB are very attractive options for customers who do not need dedicated hardware.
AWS offerings are referenced here, however, Azure and Google also have their own serverless computing services. Azure provides a service, called Azure Functions, which is a direct equivalent of AWS Lambda, while Google offers Google Cloud Functions.
Serverless Computing and Containers—A Perfect Match
Serverless computing and containers may seem like competing technologies with the same goal of separating the application from the hardware, but they are not. Both, serverless computing and containers provide a much better approach to application serviceability than traditional server virtualization. However, serverless computing depends on containers. Services like AWS Lambda or Azure Functions depend on containers to provide the required infrastructure. When AWS Lambda or Azure Functions are used, the backend services create, deploy, and run the required containers to support the application and code. When the resources are no longer needed, the containers are destroyed. If the running code or application is modified and requires more resources, additional containers are automatically deployed to meet the demand.
Regardless of the virtualization approach that an organization takes, whether it be traditional server virtualization, containers, or serverless computing, they all have the same goal—to service an application. It’s all about the application. The IT industry itself exists only to support applications and its consumers. If we take away the applications, all hardware and services required to support that infrastructure become of little use. It’s exciting to see technologies, like serverless computing and containers, that focus on the applications and not the hardware or operating system they run on. Serverless computing can be an attractive option for many organizations, and could also influence an organization’s decision to move to the cloud.