-
Book Overview & Buying
-
Table Of Contents
Java Web Internals
By :
As we saw previously, a web server always works in the request-response model. However, developing a web server can lead to important design decisions. Imagine that every web server keeps receiving requests and sending responses, in an infinite but sequential repetition. As the number of requests increases, we will have a very large queue, causing the web server to become overloaded and resulting in delays in serving customers.
How, then, can we create a web server that is more efficient and can handle multiple requests simultaneously?
In this case, the concept of multiprogramming (multithreading) becomes fundamental for us to achieve a high degree of parallelism. Each request can be handled by a different thread, freeing up the communication channel so that other clients can contact the web server.