My team transitioned a lightweight python based lambda from zip to container based and we also saw a small (but definitely real) speedup in request time. I'm not the one who did the benchmarking, but iirc it was about 10ms faster. From ~50ms to ~40ms or so.
edit: originally phrased it backwards to seem like container method was slower.
Specifically regarding cold starts of lambda instances, I recall this excellent article from Jan 2021 which measures cold start latencies for a variety of AWS lambda runtimes:
https://mikhail.io/serverless/coldstarts/aws/languages/
I would love to see a 2022 update.
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.
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.
I was interested on the cold starts though. I will have to experiment in the future.
I have a follow up coming where I use go in a container, and the request speed got a lot better.
The service in this article is my html to text convert, so having a container where I could install OS-dependencies was crucial to getting this working. It's covered here and here:
https://news.ycombinator.com/item?id=30829568
https://earthly-tools.com/text-mode