4 ms·
Lambda's design is a little perplexing in this regard.. latencies to invoke a function, even for a warm function are pretty ridiculous, and any on-host copies w
by _wmd 8y ago
Lambda's design is a little perplexing in this regard.. latencies to invoke a function, even for a warm function are pretty ridiculous, and any on-host copies will be totally invisible given the networking environment.
Despite that, e.g. the Python runtime implements RPCs by sharing a memory segment with the host process running outside the container, which seems like massive overkill to me.
I played with writing a library that would exec a new binary over the top of Python (for fun), but doing so loses access to the segment. There doesn't seem to be any UNIX API that would allow access to it to be recovered across exec. It might be possible by leaving the Python process idle and mmapping from /proc/parent_pid/mem in a child, but that requires debugging privileges almost certainly absent in a container.
The segment is created by mmapping a passed FD, which is then closed by the bootstrap code. I couldn't find any mechanism for moving that segment across processes, or inheriting it across exec.
So much simpler if they just implemented HTTP over a socket or suchlike