[getdns-api] 0.268 srv_addresses not useful

Paul Hoffman paul.hoffman at vpnc.org
Thu Jan 31 15:25:21 MST 2013


On Jan 31, 2013, at 2:18 PM, Phil Pennock <getdns-api-phil at spodhuis.org> wrote:

> On 2013-01-31 at 13:23 -0800, Paul Hoffman wrote:
>> Proposed:
>> 
>> <p>The API can make service discovery through SRV records easier. If the <code>request_type</code>
>> in the call was for SRV records, the top level of <code>replies_tree</code> has two additional names,
>> <code>srv_addresses_all</code> (a list) and <code>srv_addresses_selected</code>.
>> The <code>srv_addresses_all</code> list is ordered by priority and weight based on the weighting
>> algorithm in RFC 2782), lowest priority value first. The <code>srv_addresses_selected</code> list
>> is similar to the <code>srv_addresses_all</code> list, except with just one address from each
>> priority; the API will select this address based on a weighted probability.
> 
> I don't see the need for srv_addresses_selected because the app can do
> it effectively on its own, given the other, so it seems like code for a
> theoretical protocol that doesn't exist, despite that fact that some
> people would like there to be a protocol which uses SRV this way.
> 
> Is there such a protocol and I've just missed it?

It is part of 2782, I believe:

        Compute the sum of the weights of those RRs, and with each RR
        associate the running sum in the selected order. Then choose a
        uniform random number between 0 and the sum computed
        (inclusive), and select the RR whose running sum value is the
        first in the selected order which is greater than or equal to
        the random number selected.

--Paul Hoffman


More information about the getdns-api mailing list