fast-servers: an interesting pattern

13 points by lorddimwit


fanf

I’m worried I’ve misunderstood something, because this doesn’t make sense to me.

As I understand it, the idea is to implement the IO state machines using a thread for each state, and implement state transitions (eg from request to response) by passing an fd between threads. Threads are pinned to CPUs.

I can see a number of problems:

For a really high-end example of the latter, see Drew Gallatin’s 2021 presentation on the Netflix Open Connect Appliance in which he talks about balancing socket affinity to avoid oversaturating the server’s internal interconnect bandwidth.

It seems to me that this design is over-fitted to servers that have very simple request/response state machines, and it prioritizes simplicity of the IO dispatch loop rather than whole-system performance.

lorddimwit

It’s been ten years since first submission, and there were no comments. Lobsters has grown a lot, might be a good opportunity to get more comments now.