1
Server Architecture Models
Operating Systems Hebrew University Spring 2004
Fork-exec model Server Behavior Drawbacks
- 1. This multiprocessing architecture is useful if the
handling of the client request takes some time or a session state has to be kept by the (child) server
- 2. HTTP, however, is a stateless protocol. No session
information needs to be kept by the server
- 3. An HTTP server based on that architecture would be
inefficient
– The master server would have to create a process for each HTTP connection, which would handle this one connection only and then die – While the master server creates a process it cannot accept incoming requests – a bottleneck for the entire server.
Pre-Forking Model – The leader-followers pattern
The preforking architecture is based on a pool of tasks (processes or threads) which are playing 3 different roles:
- wait for requests (listener)
- process a request (worker)
- queue in and wait to
become the listener (idle worker)
- The listener is the leader,
the idle workers are the followers
Win32/WinNt MPM
- Uses threads (a lot more performant than Win
processes)
– The number of threads is fixed, since idle threads impose almost no performance issue
- There are two Windows processes in this
multitasking architecture:
– At restart, the master process creates the child process – The worker process (child server process) contains the threads which handle the requests, – while the supervisor process (master process) makes sure that the worker process works correctly – For connection distribution to the workers a job queue is used