Serverless computing is a form of cloud computing where resources are provisioned on-demand and in exact units based on precise usage, unlike traditional cloud computing which allocates chunks of resources that are consumed or left unused.
For billing, this entails a very precise payment model based on usage—if the serverless application requests 3.74GB of RAM, then that is what is precisely billed. In this way, resources are dynamically pulled from a massive resource pool that serves many, but ensures resource optimization.
Currently, serverless is the top most layer of the cloud computing stack, following the other 3 major cloud computing models: SaaS, PaaS, and IaaS. Like the other under layers which provide a managed resource, serverless cloud providers provide a layer that abstracts servers away from DevOps. Because cloud providers fully manage a gamut of responsibilities including provisioning, scheduling, scaling, patching, security, etc., developers using serverless are able to focus on their DevOps solely, and free of servers. In fact, this is where “serverless” gets its name, in the idea that developers are emancipated from managing back-end operations.
Serverless is often associated with microservices and Function-as-a-Service (FaaS). Generally, the context of this association encompasses the three serverless characteristics below. Together they support a serverless environment. In one instance, this may look like a platform like WordPress that manages a website backend, while providing a separated website content management dashboard for users.
Technically, the three main characteristics that define serverless environments is what sets it apart from other cloud computing models. While scaling is a fourth common benefit in the cloud.
- Stateless environment — Stateless servers retain no information. Any data to be saved must be sent to a database or storage device.
- Event-driven compute containers — The application is triggered by events, or change in the system. Upon activation, a container spools up to the exact function to execute the event request.
- Ephemeral runtime — Event-driven compute containers often invoke for just the time they are used, and then disappear.
Serverless computing is also considered a cloud-native development model, meaning apps are developed using the technologies native to cloud environments, and eliminating the use of on-premise servers, hence serverless. This requires a different programming paradigm for developers than traditional methods like those used to develop monolithic programs.