In this post, I’ll give a brief introduction to serverless computing. Specifically, I will cover what it is compared to general cloud computing and microservices, what its typical architecture is, and some research I’ve done over the last year.
What is Serverless?
To understand Serverless, we need to first review the concept of cloud computing. Unlike supercomputing, the cloud mainly consists of machines just like our laptops that we can buy on the street but with much more resources (e.g., cores, memory, network bandwith). I’m very excited about it, because it was the first time that normal users can access to near-infinite resources and computing power. However, the cloud used to be very homogeneous (i.e., most hardware was of the same types) as it’s much easier for cloud providers to manage and maintain.
What’s kept cloud remain an exciting area is mostly due to the end of Moore’s law and Dennard scaling—we can no longer get more computing power without dissipating (dispropotionately) more energy. To get around this issue, the cloud has become increasingly more specialized at both the software and hardware levels, i.e., specialized services and various accalerators. This advance comes at a time where these technologies have become more mature, and people have had more knowledge than before as to how to manage them efficiently at scale. This trend gives rise to a host of technologies including serverless computing.
From users’ point of view, serverless is a convenient interface, with which they can program to the cloud by means of high-level functions without worrying anything about infrastructure or provisioning. However, there must be still servers needs to be managed. Indeed, all these responsibilities freed up from the users have now redirected to the cloud providers. Apparently, this is rather challenging as not only do they manage all the infrastructure but also have to offer extremely elastic resource provisioning to support the mighty serverless interface.
At this point, you might be skeptical
For cloud providers, serverless is similarly enabling. It allows them to scale a user service (a server) down to zero when it’s idle, which is one of the key differences between serverless and traditional microservices that promotes similar fine-grained modularity. This feature together with the micro-scale workload granularity (functions) is what cloud providers rely on to improve idle utilization, fast switch between workloads, and, in turn, take multi-tenancy to the extreme.