5 ms·
And yet, socket activation is nothing new: inetd: https://en.wikipedia.org/wiki/Inetd https://en.wikipedia.org/wiki/Inetd xinetd: https://en.wikipedia.org/wik
by uuoc 10y ago
And yet, socket activation is nothing new:
inetd: https://en.wikipedia.org/wiki/Inetd https://en.wikipedia.org/wiki/Inetd
xinetd: https://en.wikipedia.org/wiki/Xinetd https://en.wikipedia.org/wiki/Xinetd
Used in the "olden" days to allow a single server to serve a bunch of services, not all of which are being used all of the time, to a bunch of clients, by only activating them when they are used.
- chatmasta 10y agoDoes systemd socket activation offer any advantages over xinetd?
- eeperson 10y agoYes, it can also support local sockets as well as network sockets.
- justinsaccount 10y agoAfaik something like xinetd forks and execs a copy of the daemon for each connection and communicates over stdin/stdout. This can work for simple services like sshd which fork for each connection anyway, but would never work for something like nginx or redis.
- Dylan16807 10y agoAvoiding extra processes is good, but it's not the end of the world to exec netcat.
- JdeBP 10y agoThat is untrue. Read about "wait"/"nowait" (in the xinetd and inetd manuals, for starters).
- justinsaccount 10y agoAh, I must have been thinking of something like https://cr.yp.to/ucspi-tcp/tcpserver.html https://cr.yp.to/ucspi-tcp/tcpserver.html
- JdeBP 10y agoThen you'll enjoy reading about the nosh toolset and s6-networking, which both separate the listen-accept model into separate programs and have the ability to invoke "wait" servers with the listening socket. * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh/ http://homepage.ntlworld.com./jonathan.deboynepollard/Softwa... * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/UCSPI.html#Softwares http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/UC... * http://skarnet.org/software/s6-networking/ http://skarnet.org/software/s6-networking/
- papaf 10y agoIt has one terrifying disadvantage. The socket is opened and appears to be owned by pid 1. I haven't seen the code that does this, but my hope is that it is perfect in every way - if not then its an open door from the internet into my server.