For a startup to thrive in today's competitive environment, it is critical to iterate and improve their time to test, deploy new features and delivering them to the customers. And for this to become reality, developers need to focus on developing the business features rather than maintaining and provisioning instances.
To deploy our MVP model, we had a single EC2 per microservice. Everything was running smoothly until the number of microservices went up to 20.
- For final testing our production in the staging environment, we had a dedicated instance for each of the microservices. Over the time, we realised that these instances were sitting idle and costing us really high.
- Replicating our production EC2 instances didn't turn out to be a feasible solution as well.
- Since our team is small, having a dedicated person to monitor scaling groups for EC2 wasn't possible.
- For processing just a couple of requests sometimes, we had to spin up a whole new container which took our considerable time.
We needed to change. And that's when we thought of moving to serverless architecture. Here's how it is going so far.
- For user authentication, the combination of AWS Lambda and Cognito is working fine for us (currently 5000 app users and increasing).
- For our scheduled CRON jobs, we are operating through AWS Lambda and CloudWatch.
- It turned out, our current cost is 1/5th the amount we were spending on running our instances.
- In the past 2 months, we've been able to release 10 new features after full-proof testing.
Although moving to the serverless architecture was accompanied by few hurdles. But our development team really happy with our decision. Making the correct technology choices is one of the hardest jobs and that's why we've compiled our experience in the form of a blog post- AWS Lambda vs EC2: Comparison of AWS Compute Resources.
I'd really like to know what has been your experience (especially developers) with serverless technology. Drop a comment or hit me up on Twitter @JSitapara.