XYZ
XYZ

Reputation: 779

Spring WebFlux/ Reactor core

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

Answers (1)

Brian Clozel
Brian Clozel

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.

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

Upvotes: 2

Related Questions