holy-lambda

viesti 2022-11-29T07:35:52.165539Z

This is interesting news https://aws.amazon.com/blogs/aws/new-accelerate-your-lambda-functions-with-lambda-snapstart/

๐Ÿ’ฏ 4
steveb8n 2022-11-29T08:37:59.825249Z

Very interesting. Since JVM clojure performs better than graal once started, I wonder if this means we go back to JVM?

viesti 2022-11-29T08:47:10.530119Z

I tried this in my project, where I have holy-lambda in use The plain jvm11 init duration is around 7s Then with snapstart: > Restore duration > 543.33 ms > Duration > 1801.43 ms so the init phase goes from 7s -> 500ms, which is significant (the "Duration" above is probably because we do some things like getting public signature verification keys from cognito and Hotspot defaults in use etc. next runs are faster) But there are downsides too. You have to publish lambda versions, which I haven't yet used, but could probably use (if it is like docker image tagging). The publication creates a https://github.com/firecracker-microvm/firecracker/blob/main/docs/snapshotting/snapshot-support.md, and in my example took a minute or two (didn't time, gut estimate). Also, these snapshots are cached 14 days, so maybe there would need to be a publication every 14 days or so.

viesti 2022-11-29T08:49:52.055049Z

But I think this gives more reassurance for using the JVM ecosystem with Lambda, one could use snapshotting for added speed, giving more time to build native-image solution alongside or hop onto JVM immediately before looking into native-image, or if there's a problem with native-image then still use lambda

viesti 2022-11-29T08:51:07.788129Z

I think I'll stay with native-image for now since ended up building that into the project ๐Ÿ™‚ But definitely interesting tech this is.

steveb8n 2022-11-29T08:51:27.677099Z

Fascinating. I'm already using versions so that's encouraging

steveb8n 2022-11-29T08:51:46.560459Z

Same here. Let it settle a bit

viesti 2022-11-29T08:51:57.315989Z

it was pretty easy, just enable snapshotting and then publish version

viesti 2022-11-29T08:52:26.778609Z

> Pricing โ€“ There is no extra charge for the use of Lambda SnapStart. I wonder what limits are in the snapshot creation phase, like to prevent bitcoin mining ๐Ÿ˜„

viesti 2022-11-29T08:53:07.830799Z

something like loading NLP model into memory would be interesting

steveb8n 2022-11-29T08:53:23.157069Z

I'm about to build a new service. I might try it there

๐Ÿ‘ 2
Karol Wรณjcik 2022-11-29T09:05:06.414249Z

Huh, good I still didnt touch the HL tasks. AWS will do the work for me ๐Ÿ˜€ and we go back to JVM Lambdas.

viesti 2022-11-29T09:07:22.623559Z

๐Ÿ˜„

viesti 2022-11-29T09:07:56.650529Z

maybe I still get to keep that nrepl in lamdba dream, should go and do some work on that dream ๐Ÿ˜„

Karol Wรณjcik 2022-11-29T09:13:01.426319Z

@viesti the Lambda always creates and pushes the new version on the deployment as a $LATEST tag. Meaning you can already benefit from SnapStart. @steveb8n @viesti I would love to hear if itโ€™s really a game changer and how it compares to HL.

viesti 2022-11-29T09:13:47.252229Z

aa

viesti 2022-11-29T09:14:05.434889Z

suspected that but didn't actually try, my bad :D

steveb8n 2022-11-29T11:09:42.926089Z

Will report back when I try it

Chris Lowe 2022-11-30T10:28:30.027409Z

@viesti, thanks for posting this. What memory size is your Lambda configured at? To a point, CPU is allocated proportionally to memory, so I was wondering how much horsepower your Lambda had? I believe you get a full CPU starting at 1792 MiB. Sadly SnapStart doesnโ€™t work with ARM yet so Iโ€™m not able to test SnapStart just now.

viesti 2022-11-30T10:30:47.457619Z

3008MB

๐Ÿ‘ 2