Ask HN: Is serverless worth it in some cases?
I know serverless etc. gets flak from a lot of us (for genuine reasons) and in many cases, you are better off with servers. However, there must be cases when it does make sense.
What would those be ? The idea is def. exciting that I can put an API behind something like Lambda and may be an API gateway and boom, it can scale infinitely. Is anyone truly getting good ROI from serverless ? Would love to hear positive use cases and benefits.
(
18 comments
| 7 points
| on HN
)
You’d be better off with a monolith or bunch of services running independently woven together by some message bus
There is no way I could have attempted this without serverless. Yes, a number of pieces are costly relative to running my own servers but if the idea is viable, I have a path to significant cost savings. Such as turning the step functions from standard to express workflows, moving lambdas to arm64, swapping lambdas for service integrations in step functions state machines and then moving to fargate containers (mix of standard and spot) and lastly to EC2. The overall tools available are a great balance of speed to market vs. cost. The flexibility is infinite (aka so many ways of doing things has slowed this noob down somewhat) and I am grateful to AWS for providing so much capability to a relative blind truffle pig in tech.
I would not use serverless for running anything long-running such as databases, cache stores, batch processing that takes more than just a few minutes, services that must maintain state, etc.
Zero action was needed when we launched, extra functions spun up automatically and that was it.
We could scale 10-30x without needing to request more function quota from AWS.
We use a Lambda monolith with NestJS framework behind API GW and CloudFront - it works pretty well for us... Bits of SQS, SNS and DynamoDB all hang together quite nicely...
Running a server would've been a pain to validate the need for the problem I'm solving, and I managed to scale that up beyond 2 million times per week as my customer's needs changed without my input.
Eventually, it'll be more economical to use a server 24/7 of course, but it'd cost significantly more than the premium I'm paying for serverless to move over (at the moment).