Traditionally, cloud solutions are designed for central data processing. IoT devices generate data, send it to a central computing platform in the cloud, and await a response. However, with large-scale cloud architectures, such a system inevitably leads to bandwidth problems. For future projects such as connected cities and smart manufacturing, classic cloud computing is a hindrance to growth. The...
It’s not just for private applications: enterprise digital solutions are becoming increasingly cloud-based. Several providers have launched interesting and promising service solutions, though many of them are hard to describe and distinguish. This is true of serverless computing, a very recent development that experts also refer to as function-as-a-service (FaaS). Though the name would seem to suggest that the cloud structures don’t have servers, that’s not the case. We’ll take a closer look at the technology below.
What does the serverless concept mean?
Serverless computing or serverless architecture refers to a cloud-based model that enables users to create and run applications or processes without direct contact with the underlying server. These cloud environments do have servers – though the provider takes sole responsibility for the provision, scaling, and management. Accordingly, the serverless approach goes one step further than the platform-as-a-service model (PaaS), in which developers and customers have to communicate with the server(s) via an API and add or enable resources themselves.
As these administrative tasks are not needed in projects with serverless computing infrastructures, developers can focus entirely on developing and implementing the respective software. However, to make this possible, stateless functions containing instructions for the program’s response to specific events in addition to the actual program code must be created. The respective program code – including the required functions (stateless so fully independent of infrastructure) – can then be uploaded to the cloud environment at any time. Due to the key role the functions play there, some providers call their serverless services “function-as-a-service (FaaS)”.
Serverless computing providers are responsible not only for ensuring that the required server resources are available at all times, but also for guaranteeing maximum reliability. The services are generally charged based on a pay-per-use model so that customers only pay for the services they actually use.
How does serverless computing work?
Hardware management by the provider is the key to a serverless architecture. The only challenge for users is to integrate their software, including the corresponding functions, into the rented cloud structures. These functions can be called:
- asynchronously via events
- or synchronously, based on the classic client-server model.
The former has the advantage of preventing excessive coupling of individual functions, minimising the resources required. One example of an event-based function is generating a thumbnail whenever an image is uploaded. In the classic method, the client has to send a separate request to the server to call a function and to create the thumbnail.
Unlike the platform-as-a-service infrastructure, the serverless computing provider does not continuously deliver a persistent working environment for the entire term of the contract, instead of delivering the resources required for the runtime of an individual function call. Of course, there are physical and virtual servers running in the background (though they remain unseen by users) to allow the functions to be executed.
Overview of advantages and disadvantages of serverless architecture
While classic cloud infrastructures allow users to outsource the hardware required, they often require a lot of administrative work and micro-management. Serverless computing services are intended to minimise this workload.
The table below sums up the other advantages and weaknesses of the serverless concept:
|Advantages of serverless computing||Disadvantages of serverless computing|
|The provider scales and manages the required resources||No access to virtual machines, operating system or runtime environments|
|Rapid provision of resources in real-time, even for unforeseen peak loads and disproportionate growth||Implementing serverless structures is very labour-intensive|
|Users are only charged for the resources used||Lock-in effect – for example, when changing provider, you generally have to recode all event-based functions|
|High error tolerance thanks to flexible hardware infrastructure in the provider’s computer centres||Relatively complex monitoring and debugging process, as in-depth performance, and error analyses are generally not possible|
Serverless computing in practice: When is the serverless principle deployed?
Serverless computing is primarily used for transient data exchanges by web and business applications in the cloud. In practice, the aim is not to process entire applications or extensive sequences of code (serverless architecture is entirely unsuited for that purpose), but to process any number of individual functions. That makes the approach interesting for several scenarios, as illustrated by the following list:
- API proxy: Many legacy business applications have complex, unwieldy APIs (software interfaces). With serverless architecture and the right API gateway, an alternative level of abstraction can be generated to allow these applications to be addressed via a REST API making them easier to access for other systems.
- Serverless backend: More and more companies are using serverless computing to build and run the entire backend for applications in the cloud. These scenarios are generally called backend-as-a-service (BaaS).
- Processing (un)structured data: The modern business world is inconceivable without Big Data. Serverless infrastructure is proving to be a powerful tool for processing big data, i.e. structured data (JSON, XML, etc.) or unstructured data (images, audio, etc.), including transcoding, moving, combining or manipulating.
- Running scheduled tasks: In most cases, functions are executed not only based on events, but also based on a defined schedule. For example, you can clean up databases or auto-generate backups.
- Implementing language assistants and chatbots: Serverless technology is ideal for integrating digital language assistants and chatbots.