Use the Most Recent Version of Your Server
Web server performance has improved dramatically in the short time since the creation of HTTP. The latest generation of servers are more than 10 times faster than the earliest servers. And they’re still getting better.
inetd Spawned Servers
The first generation of web servers were just another Unix service launched on demand from inetd, the Internet daemon. inetd reads /etc/services and /etc/inet/inetd.conf when it starts at boot-time and listens to the ports specified. When a request comes in on one of inetd’s ports, it launches the program specified in /etc/inet/inetd.conf to deal with requests on that port.
This mechanism is intended to conserve system resources by running daemons only when they’re needed, providing better performance for everything else. And it works that way, if you need the service only occasionally.
For example, watch the list of processes running on your system—say, with top. Start an FTP session to your own machine. When the request comes in on port 21, inetd launches ftpd, and you will see ftpd appear in the list of processes. When the FTP session is over, the ftpd process goes away.
Originally, httpd was launched the same way but from port 80, the standard port for HTTP. It worked fine at light loads, but trouble started when servers were loaded above one or two hits per second. Remember that a single HTML page can have many embedded images. Therefore, one page can quickly generate a burst of HTTP operations, reaching ...
Get Webmaster in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.