What is Serverless?

What is Serverless?

Posted on July 26, 2021 0 Comments
What is Serverless_1200x620

Serverless has become a widespread cloud computing model, but what is it exactly?

Serverless-based application development has become popular in the last few years. In this blog, we will see what Serverless is and what its essential properties are, while providing additional references along the way.

Serverless is a new form of computing with two main characteristics:

  • The cloud providers take care of the infrastructure and some of the management operations that traditionally fall to developers and devops engineers. This allows the development team to focus more on writing code and less on IT-like operations. For example, the cloud providers:
    • Dynamically scale up and down instances or other resources as needed to execute the application based on the load it receives.
    • Maintain these instances (from the hardware to upgrade the OS and dependent libraries).
  • You only pay for what you use. This way, you can start small and pay only when a project is successful.

Serverless was popularized by Amazon when AWS introduced Lambda functions in 2014. Eventually, Microsoft and Google followed suit with Azure functions and Google Cloud functions. It is now quite easy to get started with Serverless functions. Check out these blogs for examples on how to create your first functions in GCP, Azure and AWS:

The cloud vendors' initial focus was on Serverless functions. With these functions, the developer is responsible for writing the function code while the cloud provider takes the responsibility of executing the functions on demand, as well as scaling up and down the number of instances where these functions execute (the infrastructure is elastic).

In terms of cost, you pay only when the function is executing and in proportion to how long it is executing (and how much memory/how fast the CPU is). When no functions are executing, your cost is zero. This is the concept of pay as you use.

To get a better idea of how it works, here is an example for running AWS Lambda functions: at 1Gb of memory, it costs $0.0000000167 per ms of execution. Put another way: with 1 million requests per day each at 20ms for 30 days nonstop, it would cost you $10 a month.

Note: this pricing is as of July 2021. For the latest pricing, check here.

However, Serverless is not limited to functions. Recent improvements from various cloud vendors have expanded the Serverless concept to many other services, including data storage and workflow.

The key characteristics of all these Serverless services are:

  • The ability for developers to focus on solving business problems, and not spending time creating infrastructure code, maintaining server up-time and managing server hardware and software infrastructures (resiliency, scalability, elasticity, security…).
  • An elastic infrastructure: it scales based on demand (sometimes referred to as on-demand elasticity). You don’t have to provision instances for peak usage, which is very expensive and difficult as it is a guessing game (it’s very hard to know what your peak usage will really be). You don't have to implement load balancer or other similar technologies; in fact, you don't even need to be aware that such technologies exist. Again, this reduces your cost because you don't have to train the developers on these topics and they can concentrate on added business value. 
  • Pay per use: Your cost structure is very well understood as the cloud vendors only charge for usage. This is a profound change because you don’t have to pay for instances running idle. In other words, you only pay when your service is used, which means you only pay when you're successful. This makes it easier to develop a business plan and leaves room to take risks.
  • Your cost is reduced because you don’t have to train or hire experts in scaling apps as you would for traditional cloud apps.
  • Your maintenance costs are reduced as you don’t have to manage instances (think about the upgrades or patches for security as an example).
  • It is easier and cheaper to run test and pre-production environments.

With so many Serverless services, it is now possible to consider writing Serverless-only applications (Serverless First). In a future blog, we will expand on this concept.

Of course, Serverless does not mean there are no servers—there are indeed server instances running your code and ready to answer incoming requests. Instead, Serverless means that the dev team does not have to deal with servers.

While applications still need to be monitored for errors and performance (indeed, application errors have not magically disappeared), you no longer have to figure out if instances are up or down or if a specific instance is maxing out.

Gone are the days of complex resource management and capacity planning. For example, in one click, you can have your function run with 1Gb of memory instead of just 256Mb and with a four times faster CPU. No need to configure a new instance and reinstall. Even better, you can tune individual functions based on their own needs: you can have one function implementing a decision service running with a 10 times faster configuration than a second function. You don't need to spin separate instances.

So, Why Not Go Serverless?

All of these Serverless properties have enabled very small teams to compete with larger organizations, allowing them to rapidly build applications that can handle large amounts of traffic and huge variations in traffic at a very low cost.

Serverless is a transformative computing paradigm that's becoming very popular, and you should certainly consider it when implementing cloud-based applications.

In future blogs we will look at various Serverless topics like Serverless programming models, trends, composite applications and stream processing, so stay tuned. But in the meantime, I invite you to check this blog on writing Serverless business logic in an extremely efficient way. Additionally, read this blog to find out more about getting your business logic right at a lower cost.

If you want more information on how a low-code/no-code solution can help you in your Serverless journey, you can view this video (40mn) that goes into further detail.

And if you're looking to easily build, test and deploy business rules, Corticon.js a great tool to write business logic for a Serverless environment.

Learn more about Corticon.js

Thierry Ciot

Thierry Ciot

Thierry Ciot is a Software Architect on the Corticon Business Rule Management System. Ciot has gained broad experience in the development of products ranging from development tools to production monitoring systems. He is now focusing on bringing Business Rule Management to Javascript and in particular to the serverless world where Corticon will shine. He holds two patents in the memory management space.

Comments

Comments are disabled in preview mode.
Topics

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
Latest Stories
in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation