How to get random subset of large rrset (30+ IPs for round robin)?

David Klatt d.klatt at
Fri Mar 20 07:14:27 UTC 2020


I can't find a way to do the following although I invested plenty of time
in research - maybe you guys have an idea:

With bind, I'd need to serve a single A record with  30+  IP addresses  and
these addresses have to be returned in random order round robin,
which is done with:

    rrset-order {  order random;  };

and records like:

    foo  IN A
    foo  IN A
    foo  IN A  10.......N

Now I'd like bind to just return a  random subset  of e.g. 5 IP addresses
if someone requests this A record.

Reason for this are in my case some (thousands) older clients (that I can't control)
that seem not being able to handle that many IPs - the OS resolver just returns an error.

For my use case I absolutely need to make sure that each IP of that large
A record set is given out equally (statistically) and that at any time when
bind answers that one A record it only returns a random subset of all these IPs.

Has someone an idea on how to achieve the latter?

Thanks a lot in advance!

Geschäftsführer: Christoph Ostermann (CEO), Oliver Koch, Steffen Schneider, Hermann Schweizer, Tim Ulbricht.
Amtsgericht Kempten/Allgäu, Registernummer: 10655, Steuernummer 127/137/50792, USt.-IdNr. DE272208908

More information about the bind-users mailing list