Skip to content

Add randomized DNS resolver option for load balancing#907

Open
pavansai1 wants to merge 1 commit into
swift-server:mainfrom
pavansai1:randomized-DNS
Open

Add randomized DNS resolver option for load balancing#907
pavansai1 wants to merge 1 commit into
swift-server:mainfrom
pavansai1:randomized-DNS

Conversation

@pavansai1
Copy link
Copy Markdown

Summary

  • Adds HTTPClient.Configuration.DNSResolver with .system (default) and .randomized
    cases. When .randomized is selected, NIORandomizedDNSResolver is installed on the
    underlying ClientBootstrap, shuffling addresses returned by getaddrinfo.
  • Motivation: enables DNS-based load balancing for services that publish multiple A/AAAA
    records (e.g. Kubernetes headless services). The system resolver returns addresses in a
    deterministic order (typically RFC 6724 destination-address selection), which defeats
    round-robin DNS — clients hammer the first address.

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