[sr-dev] [SR-Users] Dispatcher round-robin problems in 5.2

Henning Westerholt hw at skalatan.de
Mon Aug 12 19:27:28 CEST 2019


Hi Alex,

there have been many  changes to the modules between 5.1 and 5.2. I just 
looked a bit to the code of dispatch.c and also the commits.

I noticed something in commit 3933a64c464acfb285e - there was a block 
related to round-robin before which got removed in this refactoring (if 
I analyzed it correctly):

-       /* if alg is round-robin then update the shortcut to next to be 
used */
-       if(alg == DS_ALG_ROUNDROBIN)
-               idx->last = (hash + 1) % idx->nr;

It  could be simple added back, because of the changed logic, though.

Cheers,

Henning

Am 12.08.19 um 17:28 schrieb Alex Balashov:
> Hi Daniel,
>
> Haven’t checked that, no. But all the external system does is issue RPC commands (`dispatcher.set_state`) maybe a few times a day. It’s nothing volatile or overly Byzantine.
>
>> Sent from mobile, with due apologies for brevity and errors.
>
>> On Aug 12, 2019, at 11:24 AM, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
>>
>> Hello,
>>
>> could you observe similar behavior on other dispatchers that don't use
>> an external system tomanage activation and deactivation of the gateways?
>> Or you haven't checked such one so far?
>>
>> Cheers,
>> Daniel
>>
>>> On 12.08.19 15:23, Alex Balashov wrote:
>>> Hi,
>>>
>>> I've got a proxy that does very basic round-robin distribution of calls
>>> to an elastic pool of servers, defined in a simple SQLite database with
>>> equal priorities. Nothing too complicated, just a vanilla
>>> `ds_select_domain("1", "4")`.
>>>
>>> The only complication is that seldom are most of the gateways enabled.
>>> Probing stuff was turned on, but didn't do quite what was desired, so it
>>> was replaced with a system that manages activation and deactivation of
>>> the gateways externally. Nevertheless, these are the left-over probing
>>> settings:
>>>
>>>    modparam("dispatcher", "ds_ping_method", "OPTIONS")
>>>    modparam("dispatcher", "ds_ping_from", "sip:pinger at domain")
>>>    modparam("dispatcher", "ds_ping_interval", 15)
>>>    modparam("dispatcher", "ds_probing_threshold", 256)
>>>    modparam("dispatcher", "ds_inactive_threshold", 1)
>>>    modparam("dispatcher", "ds_probing_mode", 0)
>>>
>>> After an upgrade from 5.1 to 5.2.3 (009f62), the round-robin has become
>>> extremely "sticky" and tendentious. That is to say, it directs _almost_
>>> all calls to a single gateway -- the first gateway in the table --
>>> though not 100%. There is also a marked tendency to send lots of
>>> consecutive calls to the same gateway, even if it's not the first one,
>>> though most of the time it is.
>>>
>>> Has anyone experienced similar upon upgrading to 5.2?
>>>
>>> Thanks much!
>>>
>>> -- Alex
>>>
>> -- 
>> Daniel-Constantin Mierla -- www.asipto.com
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services



More information about the sr-dev mailing list