Part 1 - Serverless Computing -

Monoj Kanti Saha
4 min readSep 12, 2021

--

This is the start of a series of blogs targeting serverless development practices in enterprises - the whole series will be discussed in different parts - First with the general discussion about using the serverless, its pros and cons and gradually unfolding the use of serverless frameworks in different hyper-scalers.

Cloud Native Development for green field applications, be it a ML or IoT or web application, serverless first is the approach now-a-days for a lot of enterprises. Most of all the cloud providers are offering serverless platform with plethora of services from DB, management tools to computation. A big part of serverless architecture is the computation part which is offered in the form of FaaS (Function as a Service). It provides polyglot platform where developers can write their code in all popular languages starting from Java, Node.js, Python to Go, Ruby etc.

Implementation of microservices has been taken to the extreme by FaaS where specially event-based architecture is implemented. Functions are “stateless”, without any affinity to the underlying infrastructure. Based on the rate of incoming events, it can replicate as much as as it requires. As a developer, one just needs to write the code, the whole infrastructure creation, management and deployment is now taken care by hyper-scalers like aws, azure or google. Moreover the game changer is the consumption based pricing model. I will describe this whole article in three sections, use-cases, force-fit scenarios and comparing popular FaaS Providers.

Key Benefits of using Serverless -

Abolishing L1 and L2 support - If an enterprise can implement an application in 100 percent Serverless platform, it can safely remove its L1 and L2 support layers for the infrastructure support. This is a benefit in terms of lowering long term operation expenditure.

Performance and Availability - The performance of the infrastructure and its availability remains unchanged throughout the lifespan. The Cloud providers availability of those services in a region resolves your HA and DR concerns.

Ready environment for Polyglot developments - Depending on libraries, ease of use and of course, availability of developers, the language of your computation engine is decided. Hyperscalers provide readily available platform for all popular languages.

Overall decrease of time to market - There are quite a few popular framework and templates available for quick development and deployment and defacto monitoring tools are available with the cloud providers.

Co-location of computation engine and users - If a global enterprise needs to deploy its resources in different geographies for regulatory and NFR purposes, serverless is the go-to platform, you do not need to create infrastructure resources everywhere. Hyper-scalers provide a lot of services including database which are truly global, the availability, localization and synchronization are all taken care of.

Overall Cost Benefit - Generally it has been observed, this platform reduces server cost by more than 70% because of the consumption based model — as you do not need to pay for idle resources.

Limitations of Serverless Use -

Cold Start / Latency Issues -This is actually the boot-up time of the getting the serverless environment up and running whenever it is invoked for the first time in a defined period. It is an inherent problem with the serverless model.

Long / Continuous Running Processes - Most of the cloud providers have a defined lifetime for the functions (like 15 min for AWS Lambda). So if the requirement is of a continuous running process like polling a queue, it is clearly an anti-pattern of serverless model.

Vendor Lock - There is a template for serverless Functions for each cloud providers. It is not easily portable among different FaaS vendors.

Comparison of FaaS layer from AWS, Azure and GCP -

AWS Lambda, by far, is the most popular one after its launch in late 2014. It can connect to the most of the services of AWS. AWS has created a template named ‘SAM (Serverless Application Model)’, which is an extension of AWS cloudformation template, to create and deploy serverless stack including events, API endpoints, Database, Lambda etc. SLS (serverless.com) provides a similar kind of opensource framework which has support for AWS Lambda, Azure Functions and Google Cloud Functions. Using its cli, it is quite handy to quickly develop and deploy functions in different clouds.

Simple 3 tier web application architecture using AWS Serverless Components

--

--

Monoj Kanti Saha

Cloud Architect — AWS, Azure, Google Cloud (Specialized in Cloud Native, Serverless, Event Driven Architecture)