Serverless compute solution can be thought of Function-as-a-service or a microservice hosted on the cloud. By using severless compute you don’t have to think of infrastructure to host the app or scaling it out. The app is automatically scaled out based on the load. In today’s competitive world it is of utmost importance to save on cost, careful use of Serverless Compute may result on big saving at the infrastructure front. There are various ways to implement severless architecture AWS Lambda, Azure function, Azure Logic Apps are some of the services provided by these majors.

serverless architecture

Benefits of Serverless Compute-

Server less compute is a great offering which allows to host your business logic in cloud. These offerings provide you ways to write the business logic in the language of your choice. You are charged based on the usage. There are certain more benefits of Severless Architecture as follows-

Avoids over-allocation of the infrastructure

If you are using servers/VMs to host your app, then you will over allocate the infrastructure to handle the peak load time, this over allocated infrastructure won’t be utilized during the normal load time. Seveverless Architecture delegates this responsibility to the cloud vendor where the app is scaled out based on the load automatically.

Stateless

These instances are stateless in nature; the instances are created and destroyed on demand. If state is required, it can be stored in the storage.

Event Driven

It is even driven in nature. Severless components like Azure Functions can be invoked via triggers (response to events) called input triggers like receiving an HTTP request, adding a message to a queue etc. There is no need to write code to handle these events rather developer need to focus on the logic.

 

Drawbacks of Serverless Compute

Execution Time

If your app is bound to run for longer duration of time then serverless components like Azure Function are not meant for you. It would be better to host it in VM. The components like Azure Functions are better suited for quickly completing a task and exit. The duration can be increased to maximum 10 minutes for Azure Functions which is 5 minutes by default . If your logic takes more than that it is better to switch to hosting your app to VM.

Execution Frequency

If you expect your function (Azure Function) to run continuously then it will end up to cost more due to the consumption of the resources, it would be then cheaper to host your app on VM.

Leave a comment