[systemd-devel] Antw: [EXT] Re: Still confused with socket activation
Uoti Urpala
uoti.urpala at pp1.inet.fi
Mon Feb 8 13:52:01 UTC 2021
On Mon, 2021-02-08 at 11:27 +0100, Reindl Harald wrote:
> this is *not* what systemd-sockets are for
> they are for service is started at the first connect
This is wrong. Socket units are useful completely independently of
whether the unit is started on demand, and it's a good idea to use them
even for services that are always started on boot. They allow
configuring listening ports in a consistent manner, and make it
possible to avoid direct dependencies between services. The latter
pretty much avoids all further issues with ordering: once you've
started all the sockets, you can freely start all the services in
parallel or in whatever order - a depended-on service process starting
later is never a problem, since requests will just get queued in the
socket and will work fine once the service is fully up. In principle,
you could even have two services which both require the other, as long
as the exact requests they make will not result in a deadlock. In
almost any setup at least the improved parallelism improves performance
at boot or when otherwise starting services.
More information about the systemd-devel
mailing list