Clients go through the trouble of locating servers for the only purpose of using their services, hopefully having their queries answered as efficiently as possible. For heavily queried services (e.g. network file systems, centralized or distributed databada systems), server design becomes a relevant issue in determining the overall performance of the distributed system. A key consideration in this respect is finding the optimal way for the server to handle the network I/O, given the kind of service it offers and the expected load of client queries. No single design scheme is best for every service, and selecting the right one depends on the constraints and the goals for the service itself. Questions that must be answered prior to chose a certain design path are, among the others: how long does it take to process a typical client's request? how many requests are likely to arrive during that time? how long a client may be acceptably left waiting? how complex the server's design can acceptably become, without being too difficult to verify? how critical is the service for the overall distributed system performance? how robust must it be?
Experience has shown that a good design for a server starts with the choice of an appropriate threading model, i.e. of an organization of the server application in parallel cooperating processes or threads (in the following the term thread will be used in both meanings).
Four commonly used threading models are, in order of increasing complexity: