Hacker News new | ask | show | jobs
by TrueTeller 2843 days ago
Yes, one could prewarm N instances by sending N parallel requests every 5 minutes. You have to know N though :)

For most apps, scale-out cold start won't be too much of a deal breaker: longer instance lifetime + shorter start will do the trick. And wait for the next wave of optimizations from vendors, I'm sure there's more to come.

P.S. I'm the author of OP, thanks for reading!

1 comments

> Yes, one could prewarm N instances by sending N parallel requests every 5 minutes.

Uhh.. you’re just speculating here right? I seriously doubt Lambda spins up a whole new container for every single “parallel” request in a short burst. There’s probably a little bit of queuing and/or they aren’t exactly parallel.

I think it’s something the vendors need to solve, like by directly prewarming prior to throwing traffic at it.

Oh and thank you for the detailed post!

I agree the vendors needs to solve this. In the meantime I think you can hack it by using Kinesis shards ( one lambda per shard ) if you know you will need many lambdas in advance. https://github.com/awslabs/aws-lambda-kinesis-prewarming