3 ms·
Here's my use case for a lambda monolith. We have a distributed process. It's very low activity; probably only a few hundred calls a day. However, it's a few hu
by gadflyinyoureye 3y ago
Here's my use case for a lambda monolith. We have a distributed process. It's very low activity; probably only a few hundred calls a day. However, it's a few hundred million in value over the year. We have 30 some odd services using NestJS to make Lambdas easier manage and to also run locally along with localstack.
If each of these services was 1 server, and each server cost around $20, we'd have to spend $600/month. I know for a fact that there are times where each service request can consume 80% of the memory. For safety we'd want at least twice the memory or number of units, which are functionally doubling the cost. That $600 can easily balloon to 12 or 2400 per month if I were to host the services. Now add another $600 per month for the test environment. So we'd be looking at $1200 - $3000 a month if we kept things really lean.
Now here's the lambda side. Most are about $3 per month (KMS is the lion's share of the cost) for the test & prod. So $90 in service hosting. Yearly lambda is $1080. Yearly self hosting/EC2/droplets is $14,000-36,000. Now repeat this pattern across 5 teams with similar approaches.
The savings add up for us. Now is this a universally true statement? Nope. But there are valid reasons.
Fun fact, if we ever needed to move off of lambdas, we can because NestJS sits on Express. As long as we can access the datastores there is minimal work to move.