Chapter 60: Sockets: Server Design
This chapter discusses the fundamentals of designing iterative and concurrent servers
and describes inetd, a special daemon designed to facilitate the creation of Inter-
net servers.
60.1 Iterative and Concurrent Servers
Two common designs for network servers using sockets are the following:
z Iterative: The server handles one client at a time, processing that client’s
request(s) completely, before proceeding to the next client.
z Concurrent: The server is designed to handle multiple clients simultaneously.
We have already seen an example of an iterative server using FIFOs in Section 44.8
and an example of a concurrent server using System V message queues in Section 46.8.
Iterative servers are usually suitable only when client requests can be handled
quickly, since each client must wait until all of the preceding clients have been ser-
viced. A typical scenario for employing an iterative server is where the client and
server exchange a single request and response.