News for hackers. Stuff that matters.
Re:Behind the scenes, AWS Lambda by Something1234 on Saturday July 10, 2021 @04:42PM (#27796302)
Fantastic paper. So I've been playing with the java and python runtimes and it's absolutely stunning how much better python is on execution and start up time.

Also how does an event actually get to the lambda handler? Because they can come from all kind of sources.

Re:Behind the scenes, AWS Lambda by ben0x539 on Saturday July 10, 2021 @10:07PM (#27797954)
Judging from five minutes of browsing the go runtime sources, they poll some lambda API:

https://github.com/aws/aws-lambda-go/blob/159d1c69878562cd54...

The response is apparently posted to another API endpoint.

Googling for the environment variable actually specifying the API endpoint, I found https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom... which seems to spell out some of the details.

Of course that just moves the question to "where does the runtime API get the event from?" but at that point they could be doing all kinds of things, I guess.

Now I'm curious to see what happens if you ask for more events before returning a response for the first event you got. Can you actually process events in parallel?

Re:Behind the scenes, AWS Lambda by mdaniel on Saturday July 10, 2021 @06:35PM (#27796967)
I believe they fire up an http server, based on how their local executor behaves, and then do "servlet-y" (or WSGi-y) dispatch into the entry point method
Re:Behind the scenes, AWS Lambda by bigodanktime on Saturday July 10, 2021 @11:52PM (#27798337)
Pretty sure its just gRPC calls, and firecracker passes events along to its firecracker-containerd services.

My guess is java is slow as it works really well when the JIT can optimize your code. Longer running functions will very likely outperform python.