Lecture Notes for Client-Server Interfaces

20 March 2001 - Server Concurrency


  1. to be, or to are - that is the question

  2. iteration or concurrency

    1. an early design decision, expensive to redo once done

    2. influences design, implementation, performance

    3. depends on expected load, software, hardware, and networking technologies - all only temporarily stable

    4. concurrency can improve availablity, performance, and security

  3. design techniques

    1. delay decisions as long as possible

    2. no decision is final

  4. concurrency levels - number of computations

    1. constant or variable number of computations - long term and extreme behavior is important

    2. unbounded concurrency is bounded by other resources - connections, processes, cpu cycles

    3. banging up against resource limimts can be rude and dangerous, or it can be a design feature

  5. demand driven concurrency - the longest delay possible

  6. concurrency costs

    1. creating and deleting new computations

    2. computation management should not exceed request processing time

    3. periods of high demand

  7. constant concurrency levels - fixed number of computations

    1. small, constant overhead amortized over many requests

    2. some coordination overhead between listener and workers

    3. long-lived computations are less forgiving than short-lived ones - storage leaks

    4. listener-worker coordination

      1. shared listen socket - fork workers; need mutual exclusion on the socket; the listener doesn't do much

      2. trickier without listen-socket mutex semantics - implement mutual exclusion; have the listener broker

      3. connectionless preallocation - similar to connection-oriented; useful for improving best-effort datagram services

      4. pre-allocation and true concurrency - eliminat scheduling overhead

  8. iterative-concurrent servers - handle variable requests

    1. service time may be non-constant and difficult to determine

    2. iteration needs short service times, concurrency needs long service times - any particular request may be either

    3. start iteratively, then go concurrent after some period of time

    4. can be expensive, can be tricky

  9. delay the concurrency-level decision

  10. reducing concurrency by harvesting workers

    1. recover resources; refresh workers;

    2. a function of idle time, time of day


This page last modified on 19 March 2001.