Subject: RE: Updates to the rfc2052bis

From: "Levon Esibov (Exchange)" <[email-masked]>
Date: Thu, 21 Oct 1999 15:08:02 -0700

>> "each time a target is needed" doesn't mean "when client needs to locate
>> a service next time", instead it refers to ordering SRV records of the
>> same priority in the order in which client attempts to contact
>> corresponding targets. Namely, when client chooses the record with weight
>> of 90 (lets call it "target 90"), this record is added to the ordered
>> "new list" as described in the "Usage rules" section. The record with
>> weight of 10 will follow the first record in the "new list", meaning that
>> the client attempts to contact the target 90 first, and if it fails, then
>> it tries to contact the target 10.
>
> That might be a reasonable choice. The document might say this between the
> lines (reading both the Weight definition and the usage rules and applying
> some common sense to what should happen.)
>
> The fact that you have to explain the meaning of "each time ..." using
> the "new list" concept in "usage rules" means that the document can't
> be read and understood in a linear fashion, which is bad.
> 
> I think this needs to be made more explicit.

I agree. Here is the proposed text for the second paragraph under the Weight
description in "The format of the SRV RR" section. I will update the draft
with this text if nobody objects.

	In the absence of a protocol whose specification calls for the
	use of other weighting information, 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. The following
	algorithm SHOULD be used to order the SRV RRs:
	To select a target to be contacted next, arrange all SRV RRs
	in the pool in any order, except that all those with weight 0
	are placed at the beginning of the list. 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. The
	target host specified in the selected SRV RR is the next one to be
	contacted by the client. Remove this SRV RR from the pool of the
	SRV records to be ordered and apply the described algorithm
	to the remaining SRV RRs to select the next target host. Continue
	the process until there are no non-ordered SRV RRs.

> BTW: As I read the "usage rules" there isn't any fallback from the
> w90 record to the w10 record in my example (where both 
> records have the
> same priority).
> The client will only use "new list" in priority order and the 
> RRs excluded
> by the random choice will not be part of "new list".
> I agree that being able to fallback to the w10 RR when the 
> w90 doesn't respond
> would be useful, but the document doesn't say that.

It does say (see the capture from the draft below):

1. "While there are still elements left at this priority level" emphasizes
that no SRV records are excluded as you mentioned in your message; all of
them are entered into the new list.

2. Second paragraph (below) clearly says that for each element in the "new
list" client queries DNS for address record and tries to connect it.

             For each distinct priority level
                  While there are still elements left at this priority
                  level

                       Select an element randomly, with probability
                       Weight, as specified above, and move it to the
                       tail of the new list

             For each element in the new list

                  query the DNS for address records for the Target or
                  use any such records found in the Additional Data
                  section of the earlier SRV response.

                  for each address record found, try to connect to the
                  (protocol, address, service).

Thanks,
Levon.

---

From: Erik Nordmark <[email-masked]>
Date: Thu, 21 Oct 1999 18:09:37 -0700 (PDT)

How about adding this
	This process is repeated for each Priority.
at the end of the "Weight" description
to emphasize that aspect (I know it is mentioned at the top
as "of the same Priority").

   Erik