© Marten Deinum 2018
Marten DeinumSpring Boot 2 Recipeshttps://doi.org/10.1007/978-1-4842-3963-6_4

4. Spring MVC - Async

Marten Deinum1 
(1)
Meppel, Drenthe, The Netherlands
 

When the Servlet API was released, the majority of the implementing containers used a thread per request. This meant a thread was blocked until the request processing finished and the response was sent to the client.

In those early days there weren’t as many devices connected to the Internet as nowadays. Due to the increased number of devices, the number of HTTP requests handled has grown. Due to this increase for a lot of web applications, keeping a thread blocked isn’t workable anymore.

As of the Servlet 3 specification, it is possible to handle a HTTP request asynchronously. ...

Get Spring Boot 2 Recipes: A Problem-Solution Approach 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.