DNS – Uneven Round-Robin Load Balancing

domain-name-systemload balancing

On round-robin DNS every IP associated to a domain has equal probability of being picked by the client.
But what if I want to set a round-robin domain over two IPs but not in a 50%-50% manner?

For example, I could add 3 A records for IP X and 2 A records for IP Y. That way X and Y would be picked by clients on a 60%-40% rate rather that 50-50 if I would've added only 1 A record for each IP.

In theory it sounds possible. But would this really work as expected?
If it worked on a specific DNS server (namely BIND), what about other DNS servers (e.g. ISP DNSs) that are permanently caching requests??
And assuming this work on the server side, how would clients handle multiple A records having the same IP?

Best Answer

Here's an implementation of weighted round robin DNS: http://www.mccartney.ie/wordpress/2008/08/19/wrr-dns-with-powerdns/

Returning multiple answers is dangerous thanks to implementations of RFC3484: http://drplokta.livejournal.com/109267.html