Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default number of threads in Spring boot 2.0 reactive webflux configuration

While using Spring 5 reactive webflux with Spring boot 2.0, what's the default number of threads used to handle requests? How can I configure the number of threads used?

like image 815
TheKojuEffect Avatar asked Oct 25 '17 06:10

TheKojuEffect


1 Answers

The default number of threads for request handling is determined by the underlying web server; by default, Spring Boot 2.0 is using Reactor Netty, which is using Netty's defaults (check out the EventLoopGroup documentation for that).

Spring Boot will soon allow you to customize that part (see #10418). In the meantime, you can provide your own ReactiveWebServerFactory bean and change that through the HttpServer configuration options (see this comment).

like image 88
Brian Clozel Avatar answered Oct 02 '22 20:10

Brian Clozel