Frequently Asked Question

What is socket activation and why is it useful?

A socket-activated service is one that does not need to be running all the time. Instead, systemd listens on the service's TCP, UDP, or Unix socket on its behalf, and only starts the service when the first client connects. The kernel buffers the incoming connection, systemd starts the service, hands the already-bound socket file descriptor across, and the new process takes over without dropping the connection.

The benefits are several. Rarely used services consume no memory until needed. Boot is faster because expensive daemons can be left dormant. Restarts can be made transparent to clients because systemd holds the socket steady while the service comes back up. And tightly-coupled services no longer need careful start-order tuning, because each one's socket is available the moment systemd starts. The idea is a modern rework of the old inetd/xinetd "super-server" pattern.

Further reading and video