Stand-alone Servers
Although inetd is a very useful tool for starting network servers, it is not appropriate for all servers. Using inetd to start the new server process requires significant system overhead. Servers that must handle many connections over short periods of time are typically run independently of inetd.
For example, a Web server, or
http[1] daemon, must respond to a new connection every time someone requests a Web page. Having inetd start a new HTTP process for each incoming connection would be much too slow. Therefore, the Web server process runs independently of inetd and will show up in a ps listing.
How does an Internet Daemon differ from a UNIX daemon?
An Internet daemon and a UNIX daemon are not fundamentally different concepts, as both refer to background processes that run on a computer system and provide specific services. However, they differ in the services they provide and their primary focus.
Internet Daemon:
An Internet daemon is a background process that specifically provides services related to internet or network communication.
These daemons typically listen for incoming network requests and perform various tasks, such as transferring files, sending emails, resolving domain names,
or managing remote connections. Examples of Internet daemons include:
-
- HTTP daemon (e.g., Apache, Nginx): Handles web server requests and serves web pages.
- FTP daemon (e.g., vsftpd, ProFTPD): Manages file transfers using the File Transfer Protocol.
- SSH daemon (e.g., OpenSSH): Provides secure shell access for remote administration.
- DNS daemon (e.g., BIND): Resolves domain names to IP addresses.
- SMTP daemon (e.g., Postfix, Sendmail): Processes and sends email messages.
- UNIX Daemon:
A UNIX daemon is a more general concept, referring to any background process running on a UNIX or UNIX-like operating system (e.g., Linux, macOS).
These daemons can provide a wide range of services, not just those related to the internet or networking. Examples of UNIX daemons include:
- System log daemon (e.g., syslogd): Collects and processes system log messages.
- Print spooler daemon (e.g., CUPS): Manages print queues and handles print jobs.
- Cron daemon (e.g., cron, anacron): Schedules and executes periodic tasks.
- Power management daemon (e.g., acpid): Handles power management events, such as battery status or laptop lid events.
While an Internet daemon can be considered a subset of UNIX daemons, it's important to note that the term "
inetd - internet service daemon
inetd (internet service daemon) is a super-server daemon on many Unix systems that manages Internet services.
It first appeared in 4.3BSD and is generally located at /usr/sbin/inetd. Often called a super-server, inetd listens on designated ports used by Internet services such as FTP, POP3, and telnet. When a TCP packet or UDP packet arrives with a particular destination port number, inetd launches the appropriate server program to handle the connection. For services that are not expected to run with high loads, this method uses memory more efficiently, since the specific servers run only when needed. Furthermore, no network code is required in the application-specific daemons, as inetd hooks the sockets directly to stdin, stdout and stderr of the spawned process. For protocols that have frequent traffic, such as HTTP and POP3, a dedicated server that intercepts the traffic directly may be a more practical alternative.
[1]Hypertext Transfer Protocol (HTTP): Hypertext Transport Protocol defines how messages are formatted and transmitted over the Web and how Web browsers should respond to those messages.