[sr-dev] [kamailio/kamailio] dispatcher: algorithm 13 latency optimized round-robin with failover (#2493)

Julien Chavanton notifications at github.com
Thu Oct 1 23:03:46 CEST 2020


#### Type Of Change
- [x] New feature (non-breaking change which adds new functionality)

#### Checklist:
- [x] Tested changes locally

#### Description
Previously discussed in the mailing list  : 

 **“13” - latency optimized routing mode, the lowest latency gets higher priority (serial forking ordered by priority, ds_ping_latency_stats is required).** 

- The algorithm will load balance using round-robin prioritizing the gateways with the highest priority.
- The priority will be lowered by 1 point every time the latency ms is as high as the priority.

Using this simple formula : ADJUSTED_PRIORITY = PRIORITY - (ESTIMATED_LATENCY/PRIORITY) 


GATEWAY | PRIORITY | ESTIMATED_LATENCY | ADJUSTED_PRIORITY | LOAD DISTRIBUTION
-- | -- | -- | -- | --
1 | 30 | 21 | 30 | 33%
2 | 30 | 91 | 27 | 0%
3 | 30 | 61 | 28 | 0%
4 | 30 | 19 | 30 | 33%
5 | 30 | 32 | 29 | 0%
6 | 30 | 0 | 30 | 33%
7 | 30 | 201 | 24 | 0%


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/2493

-- Commit Summary --

  * dispatcher: algorithm 13

-- File Changes --

    M src/modules/dispatcher/dispatch.c (43)
    M src/modules/dispatcher/dispatch.h (1)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2493.patch
https://github.com/kamailio/kamailio/pull/2493.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2493
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201001/50396ad6/attachment.htm>


More information about the sr-dev mailing list