10 ms·
Are you saying latency is lower on container than plain python? I recently made a project for the company and didn't even consider containers (which I love btw
by jaimehrubiks 4y ago
Are you saying latency is lower on container than plain python?
I recently made a project for the company and didn't even consider containers (which I love btw) because I though I could save some ms without container.
Do you know if lambda containers performance is also good in nodejs? I need to have python and nodejs lambdas.
- squeaky-clean 4y agoVersus the .zip file deploy method if that's what you mean, yes the container had a lower latency. The core code didn't change. This is just for the response time on a warmed-up lambda. We didn't benchmark cold-start times, but just from using it the cold-starts don't seem noticeably worse (Maybe they're also better? Honestly I don't know). Sorry don't know about nodejs yet. This was for a new lambda that wasn't in production yet, so it made sense to experiment. The increase in speed was unexpected but nice. But we're also assuming this increase is a static ~10ms speedup, and not a 20% speedup, but we only tested one lambda. I'm interested to see Adam's followup post and see if I'm wrong about that. Oh also just want to say, since the workings of lambda are hidden, it could be some totally different reason why containers perform better. Since its a newer feature, maybe it's running a newer version of the backend that the zip file backend will be moved to. Maybe container-based lambdas are allocated on newer hardware. Maybe containers are actually just faster. Can't ever really know without getting hired by Amazon and signing an NDA, lol.
- jamesfinlayson 4y agoSomeone here recently said that the Lambda Python runtime is not stock Python (apparently it's compiled without optimisations: https://news.ycombinator.com/item?id=30953202 https://news.ycombinator.com/item?id=30953202) - maybe that has something to do with it?
- jaimehrubiks 4y agoIt definitely could, we are talking in the order of ~10ms, even the version of python over the years can mean such improvement (or better depending on the code of course). I was interested on the cold starts though. I will have to experiment in the future.