Discussion:
[Sip-implementors] How to implement load balancing through RFC 2782
Pankaj Choudhary
2014-07-09 14:23:00 UTC
Permalink
Hi

I want to implement the logic for load balacing using RFC 2782. I gone
through RFC 2782.

Where I blocked?

Usage rules

A SRV-cognizant client SHOULD use this procedure to locate a list of
servers and connect to the preferred one:

Do a lookup for QNAME=_service._protocol.target, QCLASS=IN,
QTYPE=SRV.

If the reply is NOERROR, ANCOUNT>0 and there is at least one
SRV RR which specifies the requested Service and Protocol in
the reply:

If there is precisely one SRV RR, and its Target is "."
(the root domain), abort.


Else, for all such RR's, build a list of (Priority, Weight,
Target) tuples

Sort the list by priority (lowest number first)

Create a new empty list

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

Select an element as specified above, in the
description of Weight in "The format of the SRV
RR" Section, and move it to the tail of the new
list


At this stage, new list is filled, Now I can I extract the elements
from node. If I will sequestially fetch elements from the new list
then it is nothing is round-robin fashin. What is the actual use of
weight?


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

else

Do a lookup for QNAME=target, QCLASS=IN, QTYPE=A

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


It looks to me as round robin fashin.


*For example:*


If Resolver has been received three MRFs A, B and C. Priority is same
for A, B and C. Weight of A is 10, B is 80 and C is 10. I want to send
20 requests among these thress MRFs A, B and C. Can anyone tell me how
I would I process for load balancing among these MRFs.


Thanks in advance.


- Pankaj Choudhary

Loading...