Subject: RE: [Sip] Open Issue #145: SRV Processing in stateless proxies pa rt I

From: Jonathan Rosenberg <[email-masked]>
Date: Sat, 8 Dec 2001 00:24:17 -0500

> -----Original Message-----
> From: Henning G. Schulzrinne [mailto:[email-masked]]
> Sent: Thursday, December 06, 2001 2:15 PM
> To: Jonathan Rosenberg
> Cc: [email-masked]'
> Subject: Re: [Sip] Open Issue #145: SRV Processing in 
> stateless proxies
> part I
> 
> 
> Jonathan Rosenberg wrote:
> > 
> > Issue:
> > 
> > Processing of SRV records in stateless proxies is hard, 
> primarily because
> > the algorithm itself relies on state. One piece of state is 
> the random
> > selection of a server amongst a set with equal weights. 
> Bis-05 mandates that
> > this be done based on Call-ID, so that all requests with 
> the same call-id
> > select the same server. Turns out that this is hard to do 
> in a stateless
> > way. One approach is to choose the random number as a hash 
> of the Call-ID.
> > That is needed, but not sufficient. The problem is that the 
> result of this
> > hash generates an index, 1..N, where N is the number of 
> servers with the
> > same priority. Using this index to select a server requires 
> that the array
> > of N servers is ordered the same for each attempt. However, 
> DNS resolvers
> > make no guarantee about the order of the results. Thus, you 
> would need to
> > alphabetize them, or something, to establish an order.
> 
> Not quite. If I understand the SRV description correctly, there is an
> ordering based on the weight (so that you can pick the right 
> one). Thus,
> if the weights are not equal, the order is indeed guaranteed, 
> as long as
> the resolver doesn't mess with the weights. For load balancing, it
> doesn't matter if the weights are 1001, 1002 and 1003 instead of 1000,
> so one could recommend that SRV entries for stateless proxies simply
> avoid equal weights. This would be just a hint, not normative.

I found no text along those lines. In any case, it doesn't matter. My point
with this issue is that SOME kind of algorithm is needed to produce a
consistent ordering of the SRV values. I suggested alphabetical, you are
suggesting ordering first by priority, and for equal priority, then by
weight. Both work (assuming there are no equal weights). Using your approach
is a bit less intensive and more straightforward.

The more interesting issue is basing the selection upon a hash of the
call-id and other fields (but NOT CSeq, for example). Gonzalo wrote:

> If, as Henning suggestes, we can resolve the alphabetization, the only
> difference would be that a staless proxy would need to compute the
> random number that is used to pick one server as a result of a hash of
> some fields, whereas a stateful proxy could use any radom number
> generator.

No. Thats the problem. A *call-stateful* proxy could use a random number
generator. Thats because it would need to use the same random number for all
requests within the same dialog, and thus would need to store this number
for the duration of a dialog.

-Jonathan R.

---
Jonathan D. Rosenberg, Ph.D.                72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
Sip mailing list  http://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip