-1

I have a Webflux application, which accepts incoming json requests and returns flux responses. Each request in turn initiates a request to a another micro-service using Webclient.

How many concurrent requests can such a webflux application handle, and how many concurrent requests can such a WebClient make? More importantly are there any reactor/netty/webflux configuration parameters that help in deciding the number of concurrent requests that can be processed.

The application is mostly I/O bound, and almost all of the latency is from the outgoing requests via webclient. It's a quad-core machine with 16GB RAM.

(edited) - I am basically looking to understand how many threads are generated, the threading model in such an application, and configuration parameters that Netty provides. Note - I am not looking to actually get throughput/latency numbers for my setup (I can, and have already load tested the application).

tsar2512
  • 2,826
  • 3
  • 33
  • 61
  • It's your application and your hardware, why don't you load test it? All numbers we can provide will just be guesswork, only you can get the _real_ numbers. [gatling](https://gatling.io/) might help you as a load testing tool. – knittl Mar 01 '20 at 16:14
  • @knittl - I have load tested it, and see that the throughput maxes out at 40 req/s, and it seems to be making 40 concurrent requests as well. I think this is more to do with configuration parameters and understanding what the theoretical amount of threads should be – tsar2512 Mar 01 '20 at 20:26

1 Answers1

0

if you read the source code you find the following.

/**
 * Default max connections. Fallback to
 * available number of processors (but with a minimum value of 16)
 */
int DEFAULT_POOL_MAX_CONNECTIONS =

Integer.parseInt(System.getProperty(ReactorNetty.POOL_MAX_CONNECTIONS,
        "" + Math.max(Runtime.getRuntime().availableProcessors(), 8) * 2));

max connections are set by the parameter:

reactor.netty.pool.maxConnections

and if not set is defaulted to

available number of processors (but with a minimum value of 16)

ConnectionProvider Here you will find more of the current default values.

ReactorNetty here you can find all defined parameters and their names.

But according to this post, the defaults will change in the release of 1.0.x of Netty to:

500 max connections

1000 pending acquire max count

45s pending acquire timeout

Here is that commit

Toerktumlare
  • 12,548
  • 3
  • 35
  • 54