[OpenSIPS-Devel] [OpenSIPS/opensips] 4cb026: Fix balancing on failover.

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Mar 31 17:28:01 CEST 2015


  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 4cb026c83f929b6e4d75611605c8f34dd0e25f9d
      https://github.com/OpenSIPS/opensips/commit/4cb026c83f929b6e4d75611605c8f34dd0e25f9d
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2015-03-31 (Tue, 31 Mar 2015)

  Changed paths:
    M modules/dispatcher/dispatch.c
    M modules/dispatcher/dispatch.h

  Log Message:
  -----------
  Fix balancing on failover.

First, the way the calls were re-distributed if the calculated destination is inactive was completely unbalanced and did not respect the hashing concepts (same hash hits the same destination). Along with this problem, the fix covers the re-balancing problem - if a destination becomes inactive, the balancing over the remaining destination should not be affected (if hash H1 hits destination D1, after D2 goes inactive, H1 must still hit D1).
The use_default concept was reworked to properly work with all algorithms and in all cases (with or without weights).

Closes #387.

(cherry picked from commit 444b6802980edd4931106b4db1d8c99dd479bb32)

Conflicts:
	modules/dispatcher/dispatch.c
	modules/dispatcher/dispatch.h
	modules/dispatcher/dispatcher.c




More information about the Devel mailing list