Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method dokuwiki_TextFormatter::render() should not be called statically in /var/www/sip-router.kamailio.org/flyspray/includes/class.tpl.php on line 552 FS#460 : dispatcher doesn't loadbalance correctly if one target is offline

sip-router

Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method dokuwiki_TextFormatter::render() should not be called statically in /var/www/sip-router.kamailio.org/flyspray/includes/class.tpl.php on line 552

SIP Router Project

Tasklist

FS#460 - dispatcher doesn't loadbalance correctly if one target is offline

Attached to Project: sip-router
Opened by Sebastian Damm (sdamm) - Monday, 18 August 2014, 12:08 GMT
Task Type Bug Report
Category Module
Status Unconfirmed
Assigned To No-one
Operating System Linux
Severity Medium
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

We’re running a dispatcher setup where a loadbalancer sends traffic to a couple of proxy servers. Now if one proxy server is offline, the users from this proxy server are sent to exactly ONE other proxy server. This way, the customers still get their service, but one server has more load than the others. What I would expect is, that the dispatcher module recalculates the target and sends it equally distributed to the remaining servers.

I have setup a test environment, took the sample kamailio.cfg and edited it as needed. Had one load balancer and four registrar servers. Then I took sipp and sent 1000 REGISTER requests to the loadbalancer. I have attached a screenshot of kamctl moni of all registrars to see how they were distributed. As you can see in the first screenshot, it is equally distributed as expected.
Then I disabled proxy4. I restarted the other registrars, then sent the same 1000 requests to the load balancer. The second screenshot shows how they were distributed. As you can see, proxy3 got all the registrations from proxy4, while proxy1 and proxy2 remained at the exact same number as before.

I have attached my sample configs as well.

This task depends upon

Comment by Daniel-Constantin Mierla (miconda) - Monday, 18 August 2014, 12:11 GMT
Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method dokuwiki_TextFormatter::render() should not be called statically in /var/www/sip-router.kamailio.org/flyspray/includes/class.tpl.php on line 552

Is it the target marked as inactive? Or is is still kept as active in dispatcher list?

Haven't checked you config, but I assume you use some hashing algorithm, not round-robin.

Comment by Sebastian Damm (sdamm) - Monday, 18 August 2014, 12:11 GMT
Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method dokuwiki_TextFormatter::render() should not be called statically in /var/www/sip-router.kamailio.org/flyspray/includes/class.tpl.php on line 552

Sorry, the second screenshot was wrong, was the same as the first one. This is the correct screenshot after proxy4 was shut down.

Comment by Sebastian Damm (sdamm) - Monday, 18 August 2014, 12:15 GMT
Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method dokuwiki_TextFormatter::render() should not be called statically in /var/www/sip-router.kamailio.org/flyspray/includes/class.tpl.php on line 552

Yes, I'm not using round-robin. I'm dispatching based on the user in the To-URI. This is what we need to use so we know later on where the customer is registered.

I haven't actively disabled the proxy in the config (if I remove it from there, everything works as expected), but the dispatcher kamailio detects that the target is offline.

kamcmd> dispatcher.list
{

SET_NO: 1
SET: {
	SET_ID: 1
	DEST: {
		URI: sip:127.0.0.14:5060
		FLAGS: IP
		PRIORITY: 0
		ATTRS: 
	}
	DEST: {
		URI: sip:127.0.0.13:5060
		FLAGS: AP
		PRIORITY: 0
		ATTRS: 
	}
	DEST: {
		URI: sip:127.0.0.12:5060
		FLAGS: AP
		PRIORITY: 0
		ATTRS: 
	}
	DEST: {
		URI: sip:127.0.0.11:5060
		FLAGS: AP
		PRIORITY: 0
		ATTRS: 
	}
}

}

Comment by Daniel-Constantin Mierla (miconda) - Monday, 25 August 2014, 15:26 GMT
Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method dokuwiki_TextFormatter::render() should not be called statically in /var/www/sip-router.kamailio.org/flyspray/includes/class.tpl.php on line 552

I expect that the selection of the next hop is done based on initial size of the set (hash-id % set-size). It would require to keep another value with the size of 'active next hops' (hash-id % number-of-active-next-hops) – but then it also requires a way to count the 'current' index int the active-next-hops.

Perhaps this can be introduced as an option to the module – when enabled, instead of simply picking next-hops[hash-id % number-of-active-next-hops], it will walk the next-hops array from beginning and count the active ones until it get to the value of hash-id % number-of-active-next-hops.

Loading...