The Advantages of Serverless Cloud Providers
Most cloud providers have server-based computing services. But that requires servers to be provisioned and administered. Servers have a fixed capacity, and computation has to be performed within that capacity, which could lead to unused resources or insufficient resources.
A new DevOps trend is to go serverless. This doesn’t mean no servers are used at all; it just means that a programming model runs and tests code, without the platform using servers directly.
This serverless model has several benefits:
- Not having to provision servers
- Not having to connect to servers with a client such as SSH or a remote desktop
- Continuous scaling of computational capacity
- No server administration
- Code runs when required, so there are no unused compute resources
- Extra computation capacity is available if needed
With typical server-based cloud computing, a user provisions the servers directly, connects to a server, and runs software, as illustrated in figure 1.
With a serverless model, a user connects to a programming model or service to perform computation without ever having to provision, connect to, or manage a server, as illustrated in figure 2.
Function as a service, or FaaS, is the most common serverless architecture. FaaS models are most commonly cloud services on which users test and run application code without having to provision the infrastructure needed to run the application. An example could be a data processing application that makes use of a FaaS model, either for a short while or as a long-running application.
This could be a typical use of a FaaS model:
User creates and deploys functions, including function code, to a platform
User updates or modifies function configuration as needed
User invokes the function and gets a result
A function could be invoked directly via a command or indirectly as a response to an event. A developer still needs to develop the functional logic (also called “actions”) to be invoked.
A single function may be insufficient to perform all the necessary computation. Multiple functions could be linked to channel the output of one function as the input to another, to create a function composition. Figure 3 illustrates a composition in which three functions are used to generate the result.
The serverless model of computing makes more efficient use of resources while minimizing or totally removing user input for provisioning and managing the infrastructure needed to run the computation. Consequently, this model is becoming popular in the streamlined new world of DevOps.