Re: dependant services

From: Avery Payne <>
Date: Mon, 08 Jun 2015 16:11:56 -0700

On 6/8/2015 2:15 PM, Steve Litt wrote:
> I'm not familiar with inetd. Using sockets to activate what? In what
> manner? Whose socket?

~ ~ ~
Let's go back in time a little bit. The year is 1996, I'm downstairs
literally in my basement with my creaky old 486 with 16Mb of RAM and I'm
trying to squeeze as much as I can into my Slackware 3.6 install that I
made with 12 floppy disks. There are some of these service-thingys that
I'm learning about and they all take up gobs of expen$ive RAM, and while
I can swap to disk and deal with that, swapping is a slooooooooooow
afair because a drive that pushes 10 megaBYTES per second is "speedy".
Heck, my drive isn't even IDE, it's ESDI, and being a full-height 5 1/2"
drive is actually larger than a brick. But I digress. It would be cool
if there was a way to reduce the RAM consumption...
~ ~ ~

Me: "There's got to be something that can free up some RAM...time to dig
around documentation and aritcles online with my uber-kool 14.4 dialup
modem! Let's see here....what's this? Inetd? Whoa, it frees up RAM
while providing services! Now I just need RAM to run inetd and all the
RAM I save from not running other things can be used for mischief!"

~ ~ ~
What inetd does is:

 1. Have a giant list of port numbers defined, with a program that pairs
    with each port number (/etc/inetd.conf)
 2. Opens port numbers out of that list when the inetd daemon is run and
    listens to all of them.
 3. When someone talks to the port, the corresponding program is
    launched and the port connected to the program. If the program
    fails to launch, the connection is closed.
 4. You only need RAM for inetd + any services that launch.
 5. ...
 6. Profit!

Meanwhile, in the same year, halfway across the country in Illinois, in
a dark lab...
~ ~ ~

DJB: (swiveling around in a dramatic swivel chair, but no cat, because
cats would shed hair on his cool looking sweater) "I shall take the old
inetd concept, and make it generic and decoupled and streamlined and
secure. I shall gift this to you, the Internet, so that you may all be
secure, unlike Sendmail's Security Exploit of the Month Club which keeps
arriving in my inbox when I didn't ask for it. Go forth, and provide
much joy to sysadmins everywhere!" (queue dramatic music)

~ ~ ~
...and thus, UCSPI was born. Fast forward to 2014....while surfing
various Linux news articles, I stumble into something that sounds like
an infomercial...
~ ~ ~

  ...Systemd will now do socket activation with not only file sockets
but also network sockets too! NETWORK SOCKETS! It's like an Armed Bear
riding a Shark with Frickin' Laser Beams while singing the National
Anthem with an Exploding Background!! Get your copy today for THREE
easy payments!!! Order Now While Supplies Last!!!! OPERATORS ARE

~ ~ ~
Yes, that juicy sound is the sound of my eyes rolling up into their
sockets as I read that article, attempting to retreat to the relative
safety of my skull as I Cannot Un-see What I Have you can
tell, this isn't exactly a new concept, and it's been done before, many
many times, in various ways (inetd, xinetd, various flavors of UCSPI,
and now systemd's flavor).
Received on Mon Jun 08 2015 - 23:11:56 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC