10.2. A Simple Example

Consider a Web server with a fixed number m of threads. When a request arrives, it can be handled directly by a thread if one is available. Otherwise, it has to wait in a queue for threads as shown in Fig. 10.1. When a thread is executing a request, it may use the CPU and I/O resources. In the process of doing so, the thread may have to wait in the queue for the CPU and I/O. So. the total response time for a Web request can be decomposed into three types of components:

Figure 10.1. Example of Contention for Server Threads.

  • Software contention: time spent by a request waiting to obtain a software resource (e.g.. access to ...

Get Scaling for E-Business now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.