HTTP webClient pools

399 views
Skip to first unread message

Rui Silva

unread,
Jul 25, 2022, 5:56:47 AM7/25/22
to vert.x
Hi!

I have a doubt related with webClients (we are using the implementation from Rx: io.vertx.rxjava3.ext.web.client.WebClient) and their connection pools.

If my application has 2 distinct webClient references, but they point to the same target/destination, will their connection pools be shared or will they be independent from each other?

For example, if I have a webClient A pointing to target T with max pool size of 10 and another webClient B, also pointing to target T, and also with max pool size of 10, what will happen? Will these connections pools be completely independent? So, 10 connections for each web client? Or they will be shared and thus, a max of 20 connections for both clients?

Note: both web clients are running in a single verticle instance.

Thanks!
Rui Silva
Software developer at Bosch Group.

Julien Viet

unread,
Jul 25, 2022, 8:37:18 AM7/25/22
to vert.x
hi,

each web client has its pool.

since recently you can use a shared pool that will use the same
underlying pool:
https://vertx.io/docs/vertx-core/java/#_client_sharing

it should work equally with the WebClient

Julien
> --
> You received this message because you are subscribed to the Google Groups "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/11aef74e-5854-47ba-9e97-a39d17b37e3an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages