Reputation: 779
I am using Spring WebFlux , reactor core . I have a doubt. Does Spring webflux follow thread-per-request model? What I mean to ask is - Is there a possibility in spring webflux that a single request can be executed my multiple TOMCAT threads?
Upvotes: 2
Views: 686
Reputation: 59056
Indeed, the blocking I/O parts of the Servlet spec enforce a one thread per request model.
But non-blocking servers and even the Servlet 3.1 async I/O spec aren't enforcing that. In the case of Tomcat, the server is starting with a few threads to support both uses cases, but in WebFlux a request served by Tomcat might be processed by one or more Tomcat threads.
Upvotes: 2