← Back to context

Comment by ahartmetz

9 days ago

Regarding "there is little magic", Poettering repeatedly praises socket activation in his blog. It's not a new idea, but an old one that fell out of favor because it kinda sucked (remember xinetd?). It's about pretending that a service is running when by providing its listening socket, then starting it when the first client connects.

It has some problems: it's more complicated, it can actually slow things down compared to starting a service as soon as possible, and it has new error cases because of course "pretending that a service is running" doesn't have exactly the same effect as actually having the service running.

Socket activation is entirely optional and is not what I would personally call "magic".

I don't think "pretending that a service is running" is a fair description of what it does however. It's just buffering. It has advantages in some case which is why it exists. It doesn't "kinda suck".

  • Entirely optional, but widely used. An advertised advantage is that service A that relies on B can start before or concurrently with B. Calling that "just buffering" is really not accurate.