Internet Server Execution Models
Models for how to handle incoming Web requests
- fork for each request (NCSA httpd)---expensive!
- pre-fork processes to handle requests---Apache server
- event-driven server. Use a single thread of control in one server to
handle all events---use of select(). Avoid context switching between
processes. Used in Squid (proxy cache) and others.
- multi-threaded server. Use a single process. Might need a large
number of threads. If too many threads then may use a hybrid approach a
moderate number of threads each multiplexing a set of connections.
- small set of processes. A main process to handle static content with
auxiliary processes to handle generation of dynamic content. Better for
fault isolation.