The evolution of serverless

Before we understand serverless architecture and implementation, it is important to understand its history and how it has evolved. In the beginning, there were physical servers. Although users had complete control over physical servers, there were a lot of disadvantages, as follows:

A natural evolution from physical servers was virtualization. Virtualization refers to the creation of virtual machines on top of physical servers and deploying applications within them. Virtual machines provide several advantages:

However, virtualization had its own set of disadvantages:

The next evolution was IaaS from cloud providers. Instead of procuring and managing data centers and infrastructures, the strategy was to create virtual machines, storage, and networks in the cloud. The cloud provides software-defined infrastructure services and hides all the details related to physical servers, networks, and storage. This had some advantages:

Virtual machines in the cloud do have some disadvantages:

The cloud also provides another pattern for deploying applications, popularly known as PaaS. PaaS provides abstraction from the underlying infrastructure in terms of virtual machines, virtual networks, and storage on the cloud. It provides a platform and an ecosystem where users do not need to know a thing about the infrastructure at all; they can simply their application on these platforms. There are definite advantages using PaaS compared to IaaS, but there are still better options. The main disadvantages of PaaS are the following:

Further, a new paradigm emerged known as containers, which is primarily made popular by Docker. Containers provide a lightweight, isolated, and secure environment that has all the benefits of virtual machines, minus their disadvantages. They do not have a dedicated operating system and instead rely on a base server operating system. Containers come in both IaaS and PaaS patterns. Containers provide many advantages:

Containers do have a few disadvantages, they are as follows:

Serverless by definition is a deployment paradigm. It can be deployed on virtual machines as well as on containers. To get the best out of serverless, they should be deployed on to containers to take advantage of their faster creation and tear-down features. This will have a direct impact on scalability and high availability of serverless platform and also will be much faster, quicker compared to a virtual machine.