Skip to content

Allow choosing the HTTP client pool connection selection strategy - #6469

Open
ninadsutrave wants to merge 1 commit into
eclipse-vertx:masterfrom
ninadsutrave:http-client-connection-selection
Open

ninadsutrave wants to merge 1 commit into
eclipse-vertx:masterfrom
ninadsutrave:http-client-connection-selection

Conversation

@ninadsutrave

Copy link
Copy Markdown
Contributor

See #6312

Adds PoolOptions#setConnectionSelection with LIFO (default, current behaviour), ROUND_ROBIN and LEAST_REQUESTS, so the HTTP client can spread requests across pooled connections instead of always reusing the same one.

A couple of things worth pointing out:

  • The selectors only choose among connections that already exist and have capacity, so they don't make the pool open connections earlier than it does today.
  • PoolOptions(JsonObject) now calls this() first, like Http2Settings, so missing keys fall back to defaults. Without it, a JSON config without connectionSelection would leave it null.

Happy to change the naming or the API shape if you had something else in mind.

See eclipse-vertx#6312

Signed-off-by: Ninad Sutrave <ninadsutrave@gmail.com>
Assisted-by: Anthropic Claude (claude-opus-5-5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant