mirror of
https://github.com/swift-server/async-http-client.git
synced 2026-06-02 07:37:34 +00:00
7744c2a035
## 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. --------- Co-authored-by: Pavan sai kumar alladi <p_alladi@apple.com> Co-authored-by: George Barnett <gbarnett@apple.com>