[systemd-devel] [PATCH] Experimental socket process pool.

David Strauss david at davidstrauss.net
Mon Oct 21 04:59:27 PDT 2013


This daemon is a proof-of-concept that manages a process pool of
(usually) socket-activated child processes. It exploits the ability to
have multiple processes accept() on the same socket, allowing the
kernel to distribute requests among the children. We've talked about
adding this to systemd core, but that will probably take a great deal
more work than running it as PID > 1.

This code is definitely not ready to commit for multiple reasons (man
pages, argument parsing being confused by children getting --args, and
more), but I'd like feedback on the general idea. I've already noticed
that it doesn't work so well with multiple processes and EPOLLIN to do
accept() callbacks (like in systemd-socket-proxyd), but I'm looking
for options there [1].

I would like this to work well with (1) systemd-socket-proxyd, (2)
Twisted socket activation, and (3) node.js socket activation. If it
can handle all of those well, I'll be confident in the design.
Currently, the options for running pools of Twisted or node.js
processes are clunky, like fronting a set of instance services with
haproxy.

[1] http://stackoverflow.com/q/19493498/450218


More information about the systemd-devel mailing list