Hacker News new | past | comments | ask | show | jobs | submit login

My assumption here is that the Node implementation loads your code off disk during cold start using standard require(). Whereas the Go implementation requires loading a small wrapper (probably also in Node) which execs the Go process which then handles your request.

In my experience, GCP Functions Go cold start time is almost nil because they compile your code into the function entry point directly, so it's as quick as calling a function in process.




OK, so the main takeaway for me for example would be that if I want write lambdas in Go (because it's awesome), then GCP would be better choice for me.

But anyway, I'm not too current when it comes to lambdas. Are they compiled everytime when cold started, or is a compiled binary stored in some sort of image?


They are compiled during the deploy process, with the binary or code + deps (for JS etc) stored on S3 and loaded on demand. This counts as part of the cold boot time.


Thank you. So a Lambda always starts as a node program? I just sort of assumed that it could be any executable.


This varies by cloud provider. I'm not 100% sure this is still the case with Lambda, but this was the case when they originally added Go support.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: