On Mon, Apr 13, 2009 at 9:45 AM, Robert Joly <[email protected]> wrote: >> Hello, >> >> For a HA system, I would like to follow a heuristic for call >> routing of inbound calls. I currently have it set up to route >> the call to the highest Priority record as returned by DNS. A >> better strategy may be to go by number of active calls in a >> relay instance. Using the latter approach, I can query the >> relay on each server for the number of active Syms and try to >> load balance ( i.e. send the call to the least loaded relay). >> This would be stepping outside of normal SIP mechanisms (i.e. >> would not use DNS record priority) but would increase relay >> utilization and scalability. I feel this would be a better >> approach than using DNS to determine where to send the call. >> >> I assume it is OK to route calls to the secondary server even >> when the primary is running ( i.e. for load balancing) but I >> thought I'd do a quick check of this assumption. Any comments? >> > > What is the motivation for second-guessing the priorities and weights of > the SRV record? There might be valid factors why one would assign > priority values to favor one system over the other that go beyond > sipXrelay utilization and that sipXbridge can't consider: WAN b/w, > geographical location of system, uplink/downlink quotas, horsepower, ... > I would personally be in favor or simply honoring the weight and > priority values of the SRV record and trust that are what they are for > good reasons. > Summarizing the discussion ( on phone ) at the request of Scott :
All User Agents in sipx use DNS SRV records to decide where to send the request and so should sipxbridge. The algorithm to compare two DNS records A and B : If Record A has higher Priority than Record B then pick record A. If Record A and record B have the same priority then let weightA be the weight of record A and let weightB be the weight of record B : probabilistically pick Record A with probability weightA/( weightA + weightB) and record B with probability weightA / ( weightA + weightB). We discussed random selection vs. deterministic selection for a bit. Dale explained that for a large number of relays and calls with a random variation in the length of calls, the expected distribution for random selection will differ from deterministic selection by no more than (number of relays) ^ 0.5. That is random selection will be no worse than (number of relays)^0.5 when compared with deterministic choice of which relay should handle the call. I am nervous to demand a proof but I am sure that Dale can provide one and can correct me on this assertion if I am wrong. Ranga -- M. Ranganathan _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
