[OpenSIPS-Devel] [OpenSIPS/opensips] 07265c: Fix balancing on failover.

Liviu Chircu liviu at opensips.org
Tue Mar 31 19:00:49 CEST 2015


  Branch: refs/heads/1.8
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 07265c91794b6753e261dd04b1b5016ce39053a8
      https://github.com/OpenSIPS/opensips/commit/07265c91794b6753e261dd04b1b5016ce39053a8
  Author: Liviu Chircu <liviu 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

(cherry picked from commit 4cb026c83f929b6e4d75611605c8f34dd0e25f9d)

Conflicts:
    modules/dispatcher/dispatch.c

(cherry picked from commit 1087d50afad803fc14744eb9d925962814034ff8)

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




More information about the Devel mailing list