Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2005 12:15:36 +0200
From:      cpghost@cordula.ws
To:        Gert Cuykens <gert.cuykens@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: inetd vs standalone daemon
Message-ID:  <20050328101536.GA620@bsdbox.farid-hajji.net>
In-Reply-To: <ef60af0905032711516d992de2@mail.gmail.com>
References:  <ef60af0905032709464d9d12c3@mail.gmail.com> <20050327190511.GB15898@fw.farid-hajji.net> <6.2.0.14.0.20050327142159.03cc89f0@mail.face2interface.com> <ef60af0905032711516d992de2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 27, 2005 at 09:51:54PM +0200, Gert Cuykens wrote:
> > On Sun, Mar 27, 2005 at 07:46:09PM +0200, Gert Cuykens wrote:
> > > Can i delete inetd ?
> > 
> > No. With inetd, you can also turn regular filters into network
> > aware programs (sort of). And not every network service is always
> > needed all the time. Having a deamon for each of those seldom used
> > services hanging around is just wastful.
> 
> i think its less wasteful cpu time to run separate daemons then to run
> 1 big daemon. Because the big daemon needs to find out which service
> it needs to start every time a fedex guy is knocking at the door while
> a separate daemon already knows what it needs to do before the fedex
> guy is standing at the door.

inetd itself is not "big." It doesn't contain all other daemons.
Rather than that, it listens on the ports that are configured in
/etc/inetd.conf and accepts connections. Then (and only then)
would it fork() the configured program to handle the connection.

inetd is not useful to every kind of application. Running a web
server from inetd for every connection attempt would be silly.
But running some obscure service, that is only needed every
now and then, could be a good idea. Consider tftp as an example:
this is mainly used to netboot diskless machines or to upload
IOS updates to routers etc... On a typical network, tftp requests
would probably arrive at a rate of <1 per day. Having tftpd hanging
around as a daemon is not needed.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050328101536.GA620>