Re:Lambda on hard mode: serverless HTTP in Rust
by jvanderbot on Saturday March 16, 2024 @07:10PM
(#39730269)
I'm curious about latency, cold and warm, using docker. I have a dockerized number cruncher and it's a breeze to maintain, and I'm thinking of moving everything over. What's your experience?
[ Parent
| on HN ]
Re:Lambda on hard mode: serverless HTTP in Rust
by arrakeenrevived on Saturday March 16, 2024 @07:24PM
(#39730360)
My understanding is that cold starts on containerized Lambdas is actually better than non-containerized for some workloads, because using containers allows Lambda to do better caching of the code, as well as lazy-loading. YMMV of course based on exactly what image you use (eg if you're not using a common base, like Ubuntu or Amazon Linux, you won't get as much benefit from the caching) and how much custom code you have (like hundreds of MBs worth).
There's a very interesting blog post about it here, as well an an accompanying whitepaper: https://brooker.co.za/blog/2023/05/23/snapshot-loading.html
Re:Lambda on hard mode: serverless HTTP in Rust
by vermilingua on Saturday March 16, 2024 @07:17PM
(#39730310)
My experience with rust coldstarts was very good, my ECS backed lambdas coldstart and return a response in <40ms.
Re:Lambda on hard mode: serverless HTTP in Rust
by jvanderbot on Saturday March 16, 2024 @07:25PM
(#39730362)
Yeah at this point vercel and AWS and basically everyone support serverless docker. It's probably dumb to do anything else.
Re:Lambda on hard mode: serverless HTTP in Rust
by maerF0x0 on Sunday March 17, 2024 @01:40PM
(#39736276)
There are lots of kinds of containerization too btw, if i'm not mistaken AWS has a lot of investment in Firecracker too https://firecracker-microvm.github.io/
Re:Lambda on hard mode: serverless HTTP in Rust
by maerF0x0 on Sunday March 17, 2024 @01:38PM
(#39736261)
I never had a case where cold starts mattered because either 1) it was the kind of service where cold starts intrinsically didnt matter, or 2) we generally had > 1 req/15mins meaning we always had something warm.
3) Also you can pay for provisioned capacity[1] if the cold start thing makes it worth the money, though also just look into fargate[2] if that's the case.
[1]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-c...