What is Serverless Computing?
Those who are associated with the technology could have heard of Serverless. I thought of sharing one of my recent experiences in connection with the Serverless.
Let's assume we rented a house, even if we are on a long vacation away, we still need to pay the full rent. Even if you stay just for 10 days in the rented house, you pay for the full month's rent. How would you feel if your landlord asks you to pay only for the 10 days, not for the full month? Awesome right!! That is what exactly the Serverless. Serverless assumes uninterrupted and massively scalable infrastructure which you can't achieve in self manage infrastructure.
At the start of the COVID pandemic last year, one of the organic grocery retail chain company wanted to build a companion online ordering application. The company has been using one of the famous e-commerce platforms for the last 5 years. The existing application was looking so nice theme. But the company wanted to offer a simple interface with enhanced features, especially on the COVID pandemic.
I am was not sure what was the infrastructure requirement, and how many orders can happen per day, and how much the company can spend on the infrastructure while they have been spending on the existing platform. So, I want to have Serverless for sure. Thus, I chose to use the following to build a Single Page App keeping the Serverless in mind.
- ReactJS framework with AntDesign for the frontend
- Google's Firestore (From Firebase)
- Cloud Functions (generate on the fly invoice PDF with Python)
Rajaram, the developer who joined me in developing the front-end.
We spent a week build, and the company took a week to improve the look and feel. Google's Firebase offers easy commands to deploy the application in a few clicks. Firestore offers a simple and decent URL for the applications. We kept the URL as is without looking for a new one. The company started sharing the URL to its customers via WhatsApp.
There was a good response from the customers. 1, 2, 3, 4, 5 ... 30 days after, ... the company shared me the sales report. Unbelievable! The sales were 2.7 times even in the pandemic situation. It is approximately 2+ Million INR in sales per month. The company asked me about cloud billing for the month. I shared the below.
The total infrastructure expense cost us 163 INR for the sale for 2+ million INR sale. This is the real power of Serverless. In case, if I have done this with self-managed, maybe it could have caused approximately 10K INR. Serverless is ~60 times cheaper, with 99.95% uptime guarantee.
Despite all, Serverless has its demerits as well. If we decide to migrate to another cloud, it is not at all possible because most of our programming code is built on top of the specific cloud to provide the infrastructure which won't work on other clouds. This is something referred as to Lock-in. Nothing to worry about Lock-in, Cloud infrastructure is not at all a monopoly business. There are plenty out there with a tiny cost difference.
Choosing serverless is a wiser choice, but deciding based on your use case is so challenging. I have never been a fan of Serverless, but in this scenario per month cloud expense and 2.7 times sales made my customer happier!!