Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
net/http: Client round-robin across persistent connections #34511
When connecting directly to a service spread across multiple hosts with DNS "load-balancing" it would be ideal if
Right now, if you want to ensure that load is balanced the only practical option is to disable HTTP keepalives.
One way this could be done is to have idle connection pools for each different A record, and do a DNS resolution for every request to decide which pool to use for that request.
This round-robin mode should likely be opt-in (or opt-out). When enabled, given a DNS record like the following: