Kamailio Advanced Training
Click here for more details!

Learn how to build RTC services with Kamailio!

Monday, October 11, 2010

Best of New in Kamailio 3.1.0 - #9: Load Balancer



SIP load balancer extension - dispatcher module - comes in Kamailio v3.1.0 with a bunch of new features:
  • weight-based load balancing - you can assign weights to addresses in a destination group and Kamailio will take care to distribute calls accordingly. For example, if you want to distribute 80% of calls to one server and the rest to another one, just set weight=80 to first address and weight=20 to second one
2 sip:192.168.178.20:5080 0 0 weight=80
2 sip:192.168.178.28:5082 0 0 weight=20
  • call-load-based dispatching - the module can track active calls and select least loaded destination to distribute the traffic. Note that the module includes a light-weight call tracing system which works even in transaction stateless mode. There is no dependency on heavy modules such as dialog, making it suitable for embedded systems as well.
  • configurable list of valid codes for SIP ping replies - the module has the ability to send OPTIONS requests to addresses in destination sets in order to discover whether they are active or not. In some particular cases, the reply code could be different than 200 (for example the system is asking for authentication), but still the system should be able to handle new calls. With module parameter ds_ping_reply_codes you can define a list of reply codes or reply code classes that are valid to consider that destination is active. For example - all 2XX and 3XX replies, together with 403 and 488:
modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=488;class=3")

The value of this parameter can be changed at runtime without restartion Kamailio.

Summarizing, with the new weight and call load dispatching, the module offers now a large range of algorithms to select destination, from old ones I would mention: round-robin, priority level, random, hashing of SIP message attributes. you can hardly find a competitor to beat the performances and features of dispatcher module for SIP load balancing.

You can browse module's documentation online at:

No comments:

Post a Comment