Hi,
I have multiple Kamailio instances using dispatcher using alg “7” - hash over the content of PVs string, both using the same dispatcher list.
Is it reasonable to expect both Kamailio, given the same hash_pvar, to select the same host from the same set? Looking at the source I do not see any reason why not, but I am getting different results from the two Kamailio servers. The only difference between them is different minor version numbers - 4.3.4 and 4.3.7
I want to ensure that calls with the same hash_pvar value go to the same backend no matter which Kamailio processes the request.
Thanks!
-Barry Flanagan
Hello Barry,
If I understand you correctly you want to achieve a stable hash algorithm distribution.
Right now, I can only think of some bug fixes that could be the reason for the different behaviour of the 4.3.x Kamailio server.
I would suggest that you upgrade to a supported version (5.2.x/5.3.x).
The carrierroute module also supports a cfg file and can be used to in a somewhat consistent hash mode (you can shift the load of one server to another one without changing the distribution set completely) – if you can’t upgrade right now this might be as well an option for you.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/ Kamailio Merchandising – https://skalatan.de/merchandising
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Barry Flanagan Sent: Thursday, November 14, 2019 2:01 PM To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Subject: [SR-Users] dispatcher, pvar_hash and multiple kamailio instances
Hi,
I have multiple Kamailio instances using dispatcher using alg “7” - hash over the content of PVs string, both using the same dispatcher list.
Is it reasonable to expect both Kamailio, given the same hash_pvar, to select the same host from the same set? Looking at the source I do not see any reason why not, but I am getting different results from the two Kamailio servers. The only difference between them is different minor version numbers - 4.3.4 and 4.3.7
I want to ensure that calls with the same hash_pvar value go to the same backend no matter which Kamailio processes the request.
Thanks!
-Barry Flanagan
Hello,
indeed, if the value of the pv is the same, it should be the same hash id and same destination selected, if they are the in the same order.
Therefore the first thing to check is the list of the dispatcher records in memory via rpc/mi. If you stored the dispatcher records in database, I noticed that the mysql server can return different order for there records when doing something like 'select * ...'. To ensure a specific order always, you can set the priority value even if you don't use priority based routing algorithm.
Otherwise, there was no change to the dispatcher code related to this algorithm between 4.3.4 and 4.3.7.
Cheers, Daniel
On 14.11.19 14:01, Barry Flanagan wrote:
Hi,
I have multiple Kamailio instances using dispatcher using alg “7” - hash over the content of PVs string, both using the same dispatcher list.
Is it reasonable to expect both Kamailio, given the same hash_pvar, to select the same host from the same set? Looking at the source I do not see any reason why not, but I am getting different results from the two Kamailio servers. The only difference between them is different minor version numbers - 4.3.4 and 4.3.7
I want to ensure that calls with the same hash_pvar value go to the same backend no matter which Kamailio processes the request.
Thanks!
-Barry Flanagan
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users