Since I’ve involved myself in the world of cloud computing, I’ve been hearing a lot of new concepts and serverless is one of them. People have been telling me that serverless is great and how is it changing their lives!
Well, there are still many questions people have in their mind. In this post, I will discuss the key concepts of serverless technology and try to answer all those questions.
Let’s set the stage!
Servers are and have been an integral part of building an application. Earlier it required a special team with an allocated budget for maintenance and smooth execution.
But over the years, we’ve witnessed the evolution of cloud computing in parallel with the evolution of servers from physical servers, virtual machines, followed by IaaS and PaaS modes and quite recently, the concept of FaaS or Function-as-a-Service, popular for its statelessness and auto-scaling.
How did it happen?
Maintaining a personal hardware server is a tiresome task! Moreover, they were not feasible in terms of cost and scaling.
Later on, when the cloud computing based architecture started with the IaaS and PaaS as service models, they were adopted with great enthusiasm. Because these options were offering independent services without having to worry about maintenance of the infrastructure.
Moreover, once the provisioning of servers is done, they were ready to take client requests in the cloud. However, clients need to pay for the infrastructure, irrespective of the fact that there are zero requests or hundreds of thousands.
Initially, it proved to be a well-suited model for small-scale businesses but it turned out to be quite expensive where there are big applications and a number of requests are above average.
Entering Serverless
The cost has always been a key factor in attracting customers, which paves the way for new technology and hence, serverless architecture was born.
Serverless architecture basically means a cloud model where you only pay for the time your code is executed on the cloud infrastructure. The billing method is in a fraction of seconds and hence you will pay only for the number of requests that trigger your code to be executed.
The term ‘serverless’ is misleading because servers still exist. Adopting serverless means that you focus more on developing the application at the deployment level rather than server level. It’s just that you do not need to worry about the maintenance of servers.
Moreover, in serverless, the code is executed in the server-side stateless and event-triggered compute containers that are fully managed by the third party vendors.
The widely accepted providers of this service are technologies such as AWS Lambda, Azure Functions, IBM OpenWhisk and Google Cloud Functions. Each one of these has their own distinct properties and are used as per the application requirements.
This brings us to a new word: Function! Functions are a section of code that performs a specific task. FaaS and Serverless are quite synonymous with nature though not entirely.