Cloud

What is serverless computing?

Serverless Computing

Serverless computing is a concept in the cloud model where executing a function does not require server management. Clients are often charged only for computing resources. Resource allocation happens on-demand and completely managed by a cloud provider.

Serverless computing is often one of the following

  • BaaS (Backend as service) – Providing backend services like database interaction as service. This allows developers to focus on front-end development. eg. Mobile App.
  • FaaS (Function as Service) – Provide functionalities as service. These services are triggered by events.

Why serverless computing?

The biggest advantage of having serverless computing is developers do not have to worry about infrastructure and fast turnaround of functionalities. Some of the benefits of serverless computing are

  • Reduced cost – Does not have to provision resources in advance and are charged based on usage.
  • Fast turnaround – Developing a new functionality is easier and faster and more reliable.
  • Scalability – Autoscaling reduces the complexity of creating different policies for scaling.
  • High Availability – Serverless application provides high-availability. They are also highly fault-tolerant.

The biggest disadvantage of serverless computing is “cold start”.  A cold start is a time taken to load and execute a function for the first time. In a serverless environment after a period of inactivity, a container is brought up again only if required. This will result in a cold start.

Serverless computing may add latency to your application but comes with many benefits. Also, this latency can be reduced with a better and optimized coding practice.

With ever-emerging features, the serverless computing future looks very promising.

References:

https://serverless-stack.com/chapters/what-is-serverless.html

https://docs.microsoft.com/en-us/azure/architecture/serverless-quest/reference-architectures