DEV Community

Discussion on: Why serverless newbies should use a deployment framework

dave_albert profile image
Dave Albert

Suppose you have a small subset of endpoints in your Django app, and periodically traffic spikes drastically. For instance ingesting events based around an unexpected event (some real world event that's unpredictable). This traffic is 10x to 50x your max threshold traffic and you don't know when it might happen. What would you do in this case? Vertically scale your server to 5 - 10 times it's need for a single instance that is idle 75% of the time or more. Fail your users while you are manually scaling up. Horizontally scaling the full app across multiple VMs.

In the case of a serverless platform, this single endpoint can sit idle not costing anything then automatically scaling to the size needed and auto scale down to zero when not needed. Sure autoscaling groups can help with that, but you'd have to scale the entire app if not split out in architecture. Multiple developers working independently can deploy different endpoints at will as opposed to merging and deploying the full app. I'm still a bit unsure of serverless in production for a full application in a small team, but there are instances where there is no better option.