2
votes

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?

1

1 Answers

2
votes

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.

See the Spring Framework reference documentation "Concurrency model" section for more information about that.