Whenever you read two articles on serverless computing, you will notice at least three different interpretations of the words ‘serverless’ or ‘FaaS’. In fact, there is a lot of confusion regarding what exactly these two terms entail. Doesn’t ‘serverless’ still use servers behind the abstraction? What constitutes serverless or FaaS? Are they the same thing? If not, what exactly is the difference between FaaS and Serverless?
Within the SPEC Cloud RG, a group focussed on performance evaluation in cloud computing, I have been leading an activity focused specifically on performance evaluation within serverless computing. One of the recurring themes within those meetings, was how to describe, let alone define, serverless and FaaS. For this reason we addressed this issue in our recently published vision paper. Here I want to share with you our structured definition for both serverless and FaaS, with a focus on the relation between the two.
It is futile to attempt to provide a constrained definition for serverless. The current situation seems strangely familiar to the emergence of the term cloud computing. Like the cloud, serverless is a vague term that is somewhere in-between a marketing buzzword and an abstract term.
Even key parties in this field disagree with one another. The CNCF Serverless working group defines serverless as either FaaS or Backend-as-a-Service (BaaS). AWS seems to define serverless as a specific approach within FaaS. Others use serverless and FaaS interchangeably, both in research and in industry. Yet others, like FaunaDB, claim that something like a database can just as well be called serverless. Appropriately, one of arguably the most influential blog posts on serverless computing by Mike Roberts starts of with a pessimistic disclaimer: “…there’s no one clear view of what ‘Serverless’ is…”.
Drawing parallels to similar discussions about what constitutes the cloud, it is better to be lenient rather than be constraining with the definition. Although a strict, constraining definition for serverless is futile, there are definitely a couple of characteristics that all attempted definitions have in common. Therefore, we consider the following three characteristics to be in any a serverless offering:
- Granular billing: the service only bills the user for actual resources used to execute business logic. For example, a traditional VM does not have this characteristic, as users are billed hourly and for resources that are not actually utilized.
- (Almost) no operational logic: operational logic, such as resource management, provisioning, and autoscaling, is delegated to the infrastructure, making those concerns of the provider.
- Event-Driven: interactions with serverless applications are designed to be short-lived, allowing the infrastructure to deploy resources to respond to events — only when needed.
In our opinion it is best to describe serverless computing in terms of these broad characteristics. Focussing on a strict definition will only invite discussion about the exact phrasing. Still, in order to provide a bite-sized description of serverless, consider the following a summarized version of the characteristics defined earlier:
Serverless computing is a form of cloud computing which allows users to run event-driven and granularly billed applications without having to deal with operational logic.
With these characteristics, we can safely say that FaaS offerings as currently offered by public clouds definitely adhere to the characteristics of serverless. As often mentioned in conjunction, Backend-as-a-Service (BaaS) can in, most cases, also be considered serverless. At the same time, it is perfectly possible for a SaaS product like a database to position itself as a serverless database as long as it fits the characteristics. Similarly, albeit in rare cases, a PaaS solution, like Databricks serverless can be considered serverless as long as it adheres to the three characteristics.
In contrast to serverless, Function-as-a-Service (FaaS) is a far less ambiguous term. It is intuitively clear what specific abstraction FaaS targets (functions) and how it offers it (as a service).
In FaaS, a function can be defined as a small, stateless, on-demand service with a single functional responsibility. On a conceptual level, a FaaS function is a type of microservice with a single endpoint or responsibility.
As it is clear that a function in the context of cloud computing can only refer to a FaaS function, it does not matter whether we call it a FaaS function, serverless function, or cloud function. Some prefer the first one, a marketeer would probably prefer the second one, and I personally prefer the latter. To each their own.
With this notion of a cloud function, we can focus on providing a solid description for FaaS. One key observation of FaaS is that it requires the user to provide the business logic in the form of the source code of the function. On the other hand it requires the provider to manage the entire deployment lifecycle of the function — from deploying, to managing it’s resources, to cleaning up. The billing is on an extremely granular scale (typically in milliseconds). The final characteristic of FaaS is that functions are only ran and billed upon a request or event — making FaaS inherently event-driven.
With these characteristics we can conclude that besides running functions FaaS is a form of serverless computing. So to be a bit more formal we can define FaaS as follows:
Function-as-a-Service (FaaS) is a form of serverless computing that manages the resources, lifecycle, and event-driven execution of user-provided functions.
Examples that fit FaaS are relatively easy to identify. All major cloud providers contain a FaaS offering, such as Amazon’s AWS Lambda and Microsoft’s Azure Function. There are also various open source FaaS platforms, including Apache OpenWhisk and Fission.
Serverless will always remain a vague, broad term. Any attempt on constraining the term to mean something very specific will be in vain. Instead we are better off embracing the broadness of the term, similar to how cloud computing encompasses a wide variety of practices.
Serverless computing is a form of cloud computing that deals with event-driven services billed only for the actual resources used and requiring users to concern themselves with little to no operational logic. In contrast, Function-as-a-Service (FaaS) is a type of service in the serverless computing domain that concerns itself with deploying, managing, and executing the user-provided, stateless, short-lived functions.
Making the terms more concrete is just one of the many challenges in this space. With the SPEC Cloud RG, we identified many other challenges in this space. These challenges cover various areas, including software engineering, (system) operations and performance engineering.
If you are interested in those challenges, have a look at the The SPEC Cloud Group’s Research Vision on FaaS and Serverless Architectures paper. Interested in looking into the (performance evaluation-related) challenges in serverless and FaaS? Don’t hesitate to contact the SPEC RG Cloud or me directly to join in.