Interview Prep/Linux/Processes, Signals & systemd

What is socket activation?

AdvancedConceptProcesses, Signals & systemd
Answer

systemd opens the listening socket itself (defined in a .socket unit) and starts the matching service only when the first connection arrives, passing the open fd to it (sd_listen_fds). Benefits: services start lazily, boot is more parallel, and restarts do not drop connections because the socket stays open in systemd. sshd.socket and docker.socket are examples.

All Linux questions Roadmap: Linux

More on Processes, Signals & systemd