SERVERLESS. What is it and how does it work?

The term Serverless may lead to confusion. As ReadWrite explains, Serverless does not mean that there are no servers that host the programmatic code information, instead “developers no longer have to think much about them. The computing resources are used as services without having to manage capacity or physical limits”.

In other words, the time and resources that a worker has to devote to the implementation of a Server are reduced and can be aimed to other tasks. However, we still have to delve into the definition of what a Serverless service is. We invite you to continue reading this note to learn more about it.

 

 

Serverless: Servers in the Cloud

Our partner RedHat points out that the Serverless concept is “a cloud-native development that allows developers to design and run applications without having to manage servers”.

 

In addition, the same site explains that the service provider is the one “in charge of the routine tasks of preparation, maintenance and adaptation of the servers infrastructure”.

 

In order to use a Serverless system, the software development team must package the code in stateless containers, that is, in containers that do not store information about previous operations nor make reference about them. Besides, the software’s own code must also be stateless functions that respond to certain events.

 

Serverless Stack indicates that these events can be “HTTP requests, database events, queue services, monitoring alerts, file uploads, scheduled events, etc.”

 

 

Optimal Serverless Uses

Iones indicates that Serverless “has been conceived mainly for the ephemeral exchange of data from web and business applications in the cloud”. This type of service aims to host functions separately, to the detriment of complete applications or very extensive code sequences. The same site has created a list of different scenarios where the use of Serverless is compatible.

Proxy API: There are older commercial applications that have complex and slow API’s (software interfaces). Via Serverless architecture and a suitable API gateaway, an alternative abstraction layer can be created in order to be able to access these applications through a simple API REST that gains easier entrance to them by other systems.

Serverless Backend: Serverless Computing can be used to build and support all the Backend of an application in the cloud.

Post-processing of (unstructured data): The Serverless infrastructure is able to perform tasks of transcoding, moving, combining or manipulating structured data (JSON, XML, etc.) or unstructured data (images, audio, etc.).

Execution of tasks according to a defined schedule: Generally, functions can run automatically at defined times. This is used to automate backup and database reorganization processes.

Conversation assistants app: Serverless technology is ideal for integrating digital chat assistants and chat bots.

 

 

Advantages and disadvantages

The Serverless system delivers many benefits to the user. However, there are also softwares that are not fully compatible with this technology, in addition to some technical concerns to take into account. IBM shares some Serverless advantages and disadvantages to consider.

 

Advantages:

  • It allows developers to focus on the code, not the infrastructure. Also it gives the freedom to code in any programmatic language (Java, Python, node.js)
  • The customer pays only for the resources used during each execution of the software.
  • For workloads that require parallel processing, it can be faster, and more cost- effective than other forms of computing.
  • Serverless application development platforms provide almost total visibility into the system and user times and are able to add that information in a systematic way.

 

Disadvantages:

  • Serverless does not offer great savings for workloads characterized by predictable, stable or long running processes.
  • Sometimes, there are cases where software needs to start its execution from scratch to serve a new request.
  • The move to Microservices and Serverless architectures (and the combination of the two) deepen the complexity associated with managing monitoring and debugging tasks.
  • Serverless architectures are designed to leverage an ecosystem of managed cloud services, and in terms of architectural models, they go beyond to decouple a workload from something more portable, such as a virtual machine (VM) or a Docker container. For some companies, these patterns represent material lock-in risks that must be mitigated.