Skip to content

Custom connection pool strategy in HttpClient #6312

Description

@edu-gimenez

Hi,

Currently, I am using Vert.x 4.5.28, and due to the characteristics of my project and environment, I need to balance requests across all available connections.

I have seen that the default (and currently only) option is the LIFO selector in SharedClientHttpStreamEndpoint. This made me wonder whether it would be possible to configure the connection pool strategy for the HttpClient through HttpClientOptions.

For example, HttpClientOptions could expose an option to configure a BiFunction<PoolWaiter<HttpClientConnection>, List<PoolConnection<HttpClientConnection>>, PoolConnection<HttpClientConnection>> , which would be passed to HttpClientImpl and then to SharedClientHttpStreamEndpoint.

This would allow users to provide their own connection selector implementations when required.

If you think this makes sense, I would be happy to help by creating a PR with the necessary changes.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions