Introduction

Serverless refers to a cloud application development and execution model that allow developers to build and run code without having to manage servers, and paying for idle cloud infrastructure. So, let’s get into the details of serverless computing

What is Serverless

Serverless allows developers to concentrate on writing the best front-end application code and the business logic they can. All that the developers need to do is write their application code and deploy it on the containers that a cloud service provider manages. The cloud provider manages the rest. They provide the cloud infrastructure needed to run the code and to scale the infrastructure up and down on demand as required. The cloud provider is also responsible for all the routine infrastructure management and maintenance such as operating system patches and updates, capacity planning, security management, system monitoring and much more.

Also important: With serverless, developers never have to pay for idle capacity. The cloud provider spins up and offers the required computing resources on demand once the code executes and spins them back down again—called ‘scaling to zero’, once the execution stops.

Serverless Does Not Mean ‘No Servers’

If you think that serverless means no servers, then you have that wrong. There are servers in serverless computing. ‘Serverless’ defines the developer’s experience with those servers—they are are not visible to the developer, who does not see them, manage them, or even interact with them in any which way.

Today each leading cloud service provider provides a serverless platform Microsoft Azure (Azure Functions), including Amazon Web Services (AWS Lambda), IBM Cloud (IBM Cloud Code Engine), and Google Cloud (Google Cloud Functions). Serverless computing, microservices, and containers together make a technology that is considered to be at the core of cloud-native application development.

Advantages of Serverless Computing

  • Lower costs – Serverless computing is typically cost-effective. Traditional cloud providers of backend services (server allocation) often result in the user having to pay for space that is not being used or idle CPU time.
  • Simplified scalability – Developers need not to worry about the policies to scale up their code. The serverless vendor manages all the scaling on demand.
  • Simplified backend code – With FaaS, developers can create simple and easy functions that independently work.
  • Quicker turnaroundServerless architecture can decrease the time to market significantly. Developers can add and edit the code on a piecemeal basis instead of using a complicated deploy process.

Future of Serverless Computing

Serverless computing will continue to evolve as serverless providers bring up solutions to circumvent its drawbacks. One of these drawbacks is cold starts.

Generally, when a particular serverless function has not been called, the provider shuts down the function. This is done to save energy and to avoid over-provisioning. Once the user executes an application that calls that function, the serverless provider has to start hosting that function again. This startup time enhances the latency, which is known as a ‘cold start’.

Once the function is up and running, it will be served more rapidly on subsequent requests (warm starts). However, if the function is not requested again for some time, the function again goes dormant. Thus, the next user to requesting that function will receive a cold start.

Conclusion

As serverless computing gets more popular, we can expect to see serverless architecture becoming more common.