Skip to content

HTTP client pool should not consider two keys with the same host and distinct IP addresses to be equals. - #6279 - #6275

Merged
vietj merged 1 commit into
masterfrom
distinct-http-client-resolver
Aug 4, 2026
Merged

HTTP client pool should not consider two keys with the same host and distinct IP addresses to be equals. - #6279#6275
vietj merged 1 commit into
masterfrom
distinct-http-client-resolver

Conversation

@vietj

@vietj vietj commented Aug 3, 2026

Copy link
Copy Markdown
Member

Motivation:

HTTP client pool key comparison relies on the server address equality, this implies that two keys have the same host but distinct ip addresses are equals.

As consequence the endpoint will use the same pool and connections to the server.

This happens with DNS client side load balancing that provides a list of endpoint with the same host but different IP addresses.

Changes:

Change the HTTP client pool endpoint key to use the IP address as host when the host is equals to the server authority.

Avoid reusing the endpoint key fields as it used to be and instead use objects provided when building the pool instead, since the fields might change.

@vietj
vietj force-pushed the distinct-http-client-resolver branch 2 times, most recently from 5ef5b9b to 2650bb3 Compare August 3, 2026 15:47
@vietj vietj added this to the 5.2.0 milestone Aug 4, 2026
@vietj vietj self-assigned this Aug 4, 2026
@vietj
vietj force-pushed the distinct-http-client-resolver branch 2 times, most recently from b14c9ee to b383f5a Compare August 4, 2026 08:43
…distinct IP addresses to be equals.

Motivation:

HTTP client pool key comparison relies on the server address equality, this implies that two keys have the same host but distinct ip addresses are equals.

As consequence the endpoint will use the same pool and connections to the server.

This happens with DNS client side load balancing that provides a list of endpoint with the same host but different IP addresses.

Changes:

Change the HTTP client pool endpoint key to use the IP address as host when the host is equals to the server authority.

Avoid reusing the endpoint key fields as it used to be and instead use objects provided when building the pool instead, since the fields might change.
@vietj
vietj force-pushed the distinct-http-client-resolver branch from b383f5a to 56828c1 Compare August 4, 2026 09:14
@vietj vietj changed the title HTTP client origin resolver updates HTTP client pool should not consider two keys with the same host and distinct IP addresses to be equals. - #6279 Aug 4, 2026
@vietj vietj added the bug label Aug 4, 2026
@vietj
vietj merged commit 5a9bafb into master Aug 4, 2026
8 checks passed
@vietj
vietj deleted the distinct-http-client-resolver branch August 4, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant