Function as a service (FaaS) also referred to as serverless computing, is basically a cloud application model providing a set of functions that are executed in response to a user’s request. Here we will go through FaaS organizational principles and discuss briefly it’s benefits to telematics.
One goal of FaaS is to simplify the deployment of various applications in the cloud. It enables a particular platform to run a function on-demand while avoiding the maintenance of various servers by the user. As a result, one needs to pay only for the resources utilized by functions provided that the chosen functions actually need them.
Obviously, FaaS cant completely eliminates the necessity of actual servers, but rather leaves cloud providers managing them for users. FaaS is quite different from the other common cloud models like for instance PaaS and IaaS. Following [M. Sharad et al., 2019], a few general FaaS differences are:
- FaaS pricing based on actual resource utilization, rather than on per API call.
- Functions are commonly in a connection with traditional applications using the same server.
- Functions are abstracted from a machine type.
- The developer is charged only for the execution time of their function based on memory usage.
- Functions are normally significantly shorter in comparison to common cloud and processor architectures that often dedicated to long-running applications.
Conceptual FaaS architecture
Let’s briefly go through FaaS architecture introduced in [Kaewkasi, 2018]. A block diagram describing the common architecture for FaaS platforms is shown in the figure below. It includes system layers and FaaS layers. System layers include:
- Physical / VM : physical or virtual machines that could be mixed together. forming a hybrid infrastructure.
- Operating System: OS with a modern kernel, supporting container isolation.
- Container Runtime: responsible for provisioning the cluster.
- Container Orchestrator: Docker Swarm or Kubernetes. Docker alone with container networking is enough for a FaaS platform to get up and running effectively. Some FaaS platforms do not use any kind of orchestration.
Actual FaaS layers include:
- FaaS Gateway: helps serve HTTPS and cache some static content. Gateway instances help to make better throughput. It is usually a stateless HTTP-based reverse proxy.
- Initiator: crucial FaaS component, responsible for imitating the real invocation request to the rest of the platform.
- Message Bus: the messaging backbone of a FaaS platform, decouples initiators out of executors.
- Executor: performs the real function invocation. It connects to its own container runtime to start the real sequence of function execution.
- Log storage: designed to store information ranging from the function activities to the error logs of each invocation.
- Container runtime: the component responsible for starting the function container.
FaaS in telematics: benefits and limitations
Serverless FaaS could be adopted to solve various business cases, including those in telematics. FaaS based solutions could significantly reduce the operational cost of managing the servers, allows automatic scaling, and could form a really cost-effective solution, depending on the load. FaaS enables reduced release cycle and cost-driven directly by served events number.
In compare to PaaS, FaaS scales automatically with a cost depending on the events, rather than fixed. However, FaaS has a certain complexity in testing / debugging, with performance optimizations that are limited to code. Some other issues are startup latency and capped execution duration.
Currently, FaaS is rapidly developing technology, attracting the continuously rising amounts of users and the developer’s attention. However, it certainly can’t replace all of the existing cloud application models.
- C. Kaewkasi. Docker for serverless applications, 2018.
- E. Baez. Function as a Service (FaaS) Explained, 2020.
- M. Shahrad et al. Architectural Implications of Function-as-a-Service Computing. 2019.
- R. Sharples. Function as a Service (FaaS) – why you should care and what you need to know.
- A. Akhter. Stateful Functions as a Service in Action. 2019.