In an age of APIs, AJAX clients, and devices, web servers are under exponentially growing traffic. Figuring out ways to make servers more scalable is an ongoing challenge for server vendors. The traditional one thread per HTTP connection strategy does not scale well for a bigger number of concurrent user access. In this model, every request blocks a thread from the thread pool allocated by the Servlet container until the request is completely processed (the examples shown so far follow this model). When AJAX clients—where a single screen frequently fires multiple concurrent connection requests—join the traditional, blocking I/O model of web servers with long-running processes, servers easily get exhausted due to the thread starvation problem, since no free thread is available in the pool. This makes the application unavailable on increased load.
Asynchronous HTTP request processing is a technique that utilizes the non-blocking I/O capability of...