Skip to content

Conversation

@albertasi
Copy link

This PR stops sorting the resolver’s address list in hackney_happy:getbyname/2 by replacing lists:usort(AddrList) with AddrList. The current sorting removes duplicates and reorders IPs, which unintentionally breaks DNS randomness and can cause uneven connection distribution.

Rationale
DNS randomness is a common, simple load-spreading mechanism. Reordering results undermines it.
Duplicate handling is typically the resolver’s responsibility. If duplicates occur, they are rare and harmless; removing them here is not worth the cost of losing order.

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