What is serverless computing?

As this book’s context is that of the knowledge and skills required to pass a Microsoft certification exam successfully, we should start with understanding Microsoft’s definition of serverless:

“Serverless computing enables developers to build applications faster by eliminating the need for them to manage infrastructure. With serverless applications, the cloud service provider automatically provisions, scales, and manages the infrastructure required to run the code.”

The term serverless itself is a bit of a misnomer, as in reality, there are servers involved, much like wireless does have wires involved at a certain point in the solution; it’s more the fact that the servers do exist, but you don’t need to know or care that they exist for you to have your desired outcome met. We come back to the topic of abstraction again; the same layers still exist, and there are still servers that execute the code passed down from the runtime layer – it’s just that this layer is now further abstracted from you than it was in the IaaS and PaaS models.

The benefit of this further abstraction is that there are even fewer components to create and manage and allow development teams to focus on writing their core code without considering what’s running their code; the provider takes care of automatically provisioning these resources to run the code. This all means faster, more productive development teams, less operational overheads for DevOps teams, more significant innovation, and quicker time to value and return on investment in development resources:

Figure 1.9 – Cloud computing service models – compare and contrast

In the following illustration, we again liken this to consuming pizza:

Figure 1.10 – Cloud computing service models – layer providers

In the preceding illustration, we have included the pizza analogy once again, this time to expand to include the serverless model. Again, the comparison here in this illustration to the cloud computing service model is to what level of input and control you want to fulfill that requirement to eat some pizza.

Some of the caveats of serverless are as follows:

  • Event-based workloads are the best use case.
  • Long-running tasks are not well suited.
  • The execution environment cannot be customized.
  • The cloud provider supports specific languages and runtimes.