Hacker News new | ask | show | jobs
by perpil 23 days ago
It isn't clear what you mean by this: "The cold-start comparison has only two paired samples" Are you saying these results are based on a sample size of 2 coldstarts? If so, that's way too small to draw any conclusions. I don't know whether the web functions fleet is currently homogeneous, but I know that for ARM, the event functions fleet has a mix of Graviton2/3/4 of varying percentages. You probably need a sample size of at least 100 for each cpu generation to see trends.

It's not documented but if you make one request with event functions, the Lambda runtime lives for about 7 minutes before it's reaped. I assume this is why the Web Function bills you for about 7 minutes of memory, it needs to hold that memory while it's running in case another request comes in. If you have a lot of rarely invoked functions, it is cheaper to use Lambda Event Functions. There you'll pay for GB/s for the duration of your function.

For Event Functions with node, your best possible E2E coldstart time with an AWS service call is sub 500 ms https://speedrun.nobackspacecrew.com/blog/2025/07/21/the-fas... I have not benchmarked web functions yet, but if they are running on the same infrastructure, I would assume the lower limit is similar.

1 comments

Yes, the sample was two cold starts. The warm request benchmarks used 100 samples per route.

You raise a good point about the hardware generations. I would like to do a larger sample, though I'm not so concerned about benchmarking each cpu separately since deployers can't control the hardware their functions run on.

IMO your thought about the idle lifetime is plausible. But the distinction between how Event and Web functions handle idle time (outside of billing) is that Event functions are frozen after the invocation completes. No code can execute while frozen. Whereas Web functions stay alive during that entire period. They can do anything they want after the invocation completes and before they are shut down.

I confirmed this by logging heartbeats during the idle period.

Thanks for your thoughtful comment.

> I would like to do a larger sample, though I'm not so concerned about benchmarking each cpu separately since deployers can't control the hardware their functions run on.

Yes, if you run at least 100 coldstarts and ignore the hardware, you'll get a good real world representation. I usually execute the function every 8 minutes for a day so I get a good sample size. If you're curious to see the difference that hardware makes on coldstart times, I have a recent writeup here: https://speedrun.nobackspacecrew.com/blog/2026/10/15/shrinki...

> But the distinction between how Event and Web functions handle idle time (outside of billing) is that Event functions are frozen after the invocation completes. No code can execute while frozen. Whereas Web functions stay alive during that entire period. They can do anything they want after the invocation completes and before they are shut down.

Yes this is correct. I got the impression you weren't trying to do any extra work after the request which is why I was suggesting that event functions would be cheaper for use cases that are mostly coldstarts.