Serverless Architecture

2 min read

Serverless Architecture is an approach in software engineering where developers can write, deploy and run code without having to manage the underlying infrastructure(software and hardware). The name is little confusing. There is no such thing where you can deploy and run your application without any infrastructure. When someone says Serverless, it means the infrastructure is managed by the provider not them and they are just running their code in there.

Traditionally, in client server model, while developers have to deploy a website, they need to prepare a server computer and install all the required softwares to deploy the application. The underlying infrastructure including hardware and operating system or other dependencies are needed to manage by the developer or DevOps team.

With the evolution of cloud services, many of the layers got abstracted and being managed by the cloud service providers for you.

In the IaaS model, you can buy the service where cloud providers manage the underlying Infrastructure for you. You get access to the server and can configure as per your need. In PaaS model, you can buy the platform as a service and can deploy your application without building and managing the platform. This is built for you by the cloud providers.

One such service is Serverless, where you can offload the entire underlying infrastructure with zero management by you. You buy the service to run your code and cloud providers are managing the underlying infrastructure or related resources for you. You can configure the resources to reserve certain amount to avoid unexpected interruption during runtime due to the resource crisis.

Some popular Serverless services are – AWS Lambda, Azure Function, Google Cloud Function

The cloud providers manage the infrastructure for you. It runs your function or code based on some trigger or event. You can test your function before putting it go-live. Also, you can monitor the resources being used by the function in runtime. In some advanced technique, you can have control in the runtime environment by listening to some state event. For example, after the runtime is ready and before running your code, you can be notified and probably you can log or send admin notification or so.

The key advantages of Serverless architecture are – You don’t have to manage the infrastructure and can completely focus on your application building. You only pay for the resources what’s been used by the application or code in runtime. This way, cost is reduced significantly.

The disadvantage is – you don’t have much control or visibility on the backend infrastructure. In cases, where you need to customize or manually build your server to deploy your application you better have to chose other relevant service.

Leave a Reply

Your email address will not be published.