HTTP client pool should not consider two keys with the same host and distinct IP addresses to be equals. - #6279 - #6275
Merged
Conversation
vietj
force-pushed
the
distinct-http-client-resolver
branch
2 times, most recently
from
August 3, 2026 15:47
5ef5b9b to
2650bb3
Compare
vietj
force-pushed
the
distinct-http-client-resolver
branch
2 times, most recently
from
August 4, 2026 08:43
b14c9ee to
b383f5a
Compare
…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
force-pushed
the
distinct-http-client-resolver
branch
from
August 4, 2026 09:14
b383f5a to
56828c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.