Server types: -------------------------- (1) Iterative server: each client request is processed in its entirety before accepting the next client. Use this approach if connection/service time is very short (avoids overhead of forking, etc.); also supports mutual exclusion for clients (2) Concurrent server: client handled separately from the listener; parent listens again immediately. (2a) Concurrent "fork" server: more overhead; if a child (parent) process dies, others are okay; may take advantage of multiple CPUs (2b) Concurrent "thread" server: faster than fork; but if the process dies, ALL threads are dead. (2c) Concurrent "select" server: less OS overhead related to fork/thread maintenance; used to listen on many ports (3) Pre-forking server or pre-threading server: create a bunch of child processes or threads and have this "pool" available when clients connect ---- could be static number of threads/processes ---- or could dynamically change based on traffic --------------------------- Design client/server diagram/architecture for: (a) a Web server with a database back-end (b) a distributed file system What kind of server? Why? What "pieces" go where? Why? Security? Performance? Extensibility? Reliability? Problems: -------------- --> single point of failure --> bottlenecks --> server overloads --> cost $$$ --> complexity Advantages: --------------- --> extensibility --> reliability --> ability to swap in different components (e.g. database)