[getdns-api] 0.268 srv_addresses not useful

Matt Miller linuxwolf
Thu Jan 31 23:44:02 CET 2013


On Jan 31, 2013, at 3:25 PM, Paul Hoffman <paul.hoffman at vpnc.org> wrote:

> 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.
> 

Personally, I've always interpreted RFC2782 as I believe Phil does.  I'm supposed to try all of the servers at the lowest priority first before moving onto the next set.  Phrases such as "... target hosts with the same priority SHOULD be tried in an order defined by the weight field," and "... a client arranges the SRV RRs of the same Priority in the order in which target hosts, specified by the SRV RRs, will be contacted ..." have influenced that interpretation.

Assuming my (and Phil's) interpretation is correct, srv_addresses_selected appears to be less useful.  I could see it helping to implement a HE-like algorithm, where the client tries to connect to all servers at a given priority (with some very short interval between each attempt, 'cause "screw you buddy, I'm not waiting 20-45 seconds per connect() attempt, even if I am asynchronous!").

But if my interpretation is not correct, then I stand corrected!


- m&m

Matthew A. Miller
< http://goo.gl/LK55L >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2305 bytes
Desc: not available
URL: <http://www.vpnc.org/pipermail/getdns-api/attachments/20130131/5796dd03/attachment.bin>



More information about the spec mailing list