Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Refresh connections of the webclient pool

45 views
Skip to first unread message

Bruno F

unread,
Sep 13, 2024, 8:10:01 AM9/13/24
to vert.x
Hi,
I have a funny behavior when scaling up kubernetes replicas of an HTTP/1.1 web service that is called by my vert.x backend: my backend is not using the new replicas.

I think the scenario is the following:
  • start with 1 replica of the web service called by the backend
  • put the backend under high load (let's say concurrency of 10)
  • the (unique) webclient calling the web service quickly reaches the maximum number of persistent connection in the pool (8)
  • because the backend is under high load, persistent connection never expire
  • those connections are all connected to the first replica of the web service
  • scale the number of replicas to 8
  • because connections to the first replica are still valid and because the connection pool is already full, no new connection is made to the replicas and the first replica is still receiving the load
I think I can add an Ingress/reverse proxy between my backend and the web service but I'm wondering: is there a way to configure the web client so it does not reuse HTTP/1.1 persistent connections more than X times or more than Y seconds?

Thanks in advance,

Bruno.

Thomas SEGISMONT

unread,
Sep 19, 2024, 4:35:35 AM9/19/24
to ve...@googlegroups.com
Hi,

In the SQL Client pool options, we have a max lifetime pool option. Perhaps we could have the same in the Http Client.

Fancy a PR?

Regards,
Thomas

--
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/4f43b307-1d17-4efa-8023-2f0bd21682c0n%40googlegroups.com.
Message has been deleted

Bruno F

unread,
Oct 10, 2024, 3:48:07 AM10/10/24
to vert.x
Hi Thomas,

I've just taken the time to have a look under the hood of the WebClient (HttpClientImpl, ConnectionManager, Endpoint, ClientHttpEndpointBase, SharedClientHttpStreamEndpoint, ConnectionPool, SimpleConnectionPool) and it looks too complex for me.
I have the impression the modification should take place somewhere in SimpleConnectionPool but the class is not so Simple ;-)
So no: I will not take the risk.
Sorry,

Best regards,
Bruno.

Thomas SEGISMONT

unread,
Oct 16, 2024, 9:00:10 AM10/16/24
to ve...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages