Serverless, the art of bypassing servers…

The cloud is made of millions of servers running millions of apps. The extension of a private cloud to a public cloud is often achieved by replicating what is already known: setting up servers, installing software and running applications. This is the Infrastructure as a Service (IaaS) model. Moving away from the management of operating systems and software, we reach Platform as a Service (PaaS) and Software as a Service (SaaS) models. In the case of IaaS and PaaS, a form of control is maintained over the underlying software platform, whereas in SaaS, one merely consumes a service whose hardware and software management are entirely provided by the service provider.

One form of SaaS that has grown significantly in recent years, mainly under the impetus of application developers, is serverles computing. It’s also called Function as a Service. Developers needed to run certain functions of their applications without setting up hardware and software. The important thing was to be able to run a program at scale.

You Only Pay for What You Execute

One of the main advantages of serverless is to pay only what you use. This is, in fact, one of the features of the cloud, at the application level. When you use a virtual server or cloud application, it’s often billed monthly. If your usage rate is low, the price-to-cost ratio is strong and the cost advantage decreases. With serverless, only machine time is charged. Thus, a few minutes or hours per month of execution is more economically advantageous than a server or a static application.

vintage adding machineFrom a code execution perspective, you can add the costs you no longer have: hardware, operating systems, maintenance, hardware and software dependencies, updates, to name a few. You simply run what you have to execute and pay accordingly.

In the price equation, we can also add that of the proximity of the user. It is indeed possible to run the code as close as possible to the user in order to try to reduce latency to the maximum. The code is then automatically replicated on multiple data centers to bring it closer to the user of the application.

Almost Everything Is Available in Serverless

All cloud service providers have embraced serverless, from Amazon with AWS Lambda to Oracle with Oracle Fn to Microsoft with Azure Functions,
IBM and Google with their respective Cloud Functions. Add a pinch of development frameworks with Serverless Framework and you have a perfect mix to develop application functions that run in the cloud without having to worry about their underlying hardware and software.

The databases have also started to do so. One might imagine at first glance that managing a database requires a little low-level management, but depending on application needs, it can become cost effective and interesting to get rid of the underlyings to focus on content, data. Aurora at Amazon, Azure Data Lake at Microsoft or Google Firebase are examples of such serverless databases.

Pros and Cons

Serverless has become popular with many developers, especially for its ease of implementation and its low cost. The elasticity of the functions is also to be highlighted. The system dynamically allocates the resources necessary to scale up and down. It is also in this elasticity that lies one of the disadvantages of the serverless.

If your function is infrequently used, the system may scale down and latency may increase each time the function is invoked. Debugging is often more complicated, especially when it comes to understanding and analyzing performance problems, with the system putting many layers of abstraction.

Star Wars Stormtropper figurine on table

Data security and privacy should be particularly well thought out. It is recommended to use service accounts whose rights are strictly limited to the performance of functions. This also adds to the complexity of managing and auditing the application. Finally, when you start developing a function with a provider, assume that it will be very difficult, if not impossible, to change. You become at the mercy of the goodwill of this company.

A Trend That Will Last

For having a little used Lambda for some AI functions, I can admit that the serverless is quite stunning. It is indeed possible to develop very powerful functions by focusing only on the results and not on the necessary resources to achieve them. When you combine serverless with the power of frameworks and containers, it becomes possible to deploy highly scalable applications with just a few clicks, paying only a tiny fraction of the prices of the resources used.

It is therefore not surprising that serverless has become popular in a few years and that all cloud service providers have embraced it. With the trend of microservices, the serverless has a bright future ahead of it. It’s up to you to start!

Photos by Jordan Harrison, Alvaro Reyes, and Liam Tucker on Unsplash

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: