Hacker News new | past | comments | ask | show | jobs | submit login

The section on Lamba missed the biggest problem: latency and cost.

For low regularity calls, Lambda suffers badly from the cold start problem. The first call to Lambda must actually create the lambda which can take hundreds of milliseconds. This problem also shows up when the level of requests exceeds the number of lambdas currently active, causing a cold start as the new lambda instance is created. It’s not uncommon to see some services inject fake requests with some regularity to insure that there are enough warm lambda instances to avoid the cold start problem, which is silly.

Secondly, all lambda calls are charged by the millisecond, but the all calls are rounded up to 100ms. So if your typical lambda call is 5ms, you might be paying for 20x more time than you’re actually using.

Both of these issues led my former team to use a regular ECS app rather than lambdas.




Your mileage may vary. I process tens of millions (if not hundreds of millions) of requests on Lambda each month. If you have meaningful volume, cold starts aren't a problem. And when with my volume of traffic, lambda use is a tiny fraction of my AWS bill ($30 max?). I'd be interested to know who is dissatisfied with the cost and paying more than $100/mo and what you're running (and how that would be expensive for you, considering the kind of operation you must be running).

But also, if you don't have highly variable traffic, why would you use Lambda in the first place? If you have negligible traffic (enough to sit on the free tier), why not just use a single cheap EC2 instance? Lambda trades start time for lack of a server—it's shared resource utilization taken to the extreme. You're lowering your cost by letting AWS use the bare minimum to keep your service available, and that means turning your code off when it's not running. If you want to keep your code available at a hundred millisecond's notice, just have a server running.

I assume most of the folks running into this just couldn't be bothered to pay the $7/mo for a hobby Heroku dyno or run a dirt cheap EC2 instance. Really interested to hear from folks that find Lambda impractical for serious use cases.


That doesn’t sound right. A hundred million requests would cost $350 a month just in API Gateway charges.


I'm not using API gateway. I invoke Lambda via the API.


That's REST requests... HTTP requests are $1/million.


That’s still $100, which is much more than the $30 mentioned.


Cold starts are only a problem if you’re latency sensitive; I forgot to specify that.

I’m speaking from the context of a large company that’s well beyond the free tier, for whom AWS bills matter. If you’re down in the free tier, setup time dominates all other concerns.


This I think misses the point of Lambda a little. If you want to keep your Lambda instances warm all the time, you should use ECS because that's what ECS is. Lambda is for intermittent workloads where latency is less important and the cost of spending 100ms invoking an instance is less than the cost of keeping an idle container up and running all the time.


I agree that intermittent, latency insensitive operations is exactly what Lambda is good for. However this is fairly disjoint with what the hype around serverless has been about, which is why I mention it.


There has been an option for Provisioned Concurrency in Lambda functions since December 2019: https://docs.aws.amazon.com/lambda/latest/dg/configuration-c...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: