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

Kevin Darcy kevin.darcy at fcagroup.com
Fri Mar 20 13:58:22 UTC 2020


[ Classification Level: GENERAL BUSINESS ]

Only thing that comes to mind is a constantly-running dynamic update script
that adds/deletes records to/from the RRset at random.

A more sophisticated version of the script would look at what answers that
have been given out in the recent past, and if some addresses were given
out more than others (because of the randomness), "tilt" the answer set
back more towards equal representation.


                                - Kevin

On Fri, Mar 20, 2020 at 3:15 AM David Klatt <d.klatt at sonnen.de> wrote:

> Hi,
>
> 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  10.0.0.1
>     foo  IN A  10.0.0.2
>     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!
>
> David
> 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
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to
> unsubscribe from this list
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20200320/5e1a3f3e/attachment.htm>


More information about the bind-users mailing list