[SR-Users] Load balance on HA scenario

Duarte Rocha duarterocha91 at gmail.com
Thu Oct 15 13:48:19 CEST 2020


Hi,

I'll try to better clarify my scenario.

I can't use probing in this situation, as my peer won't allow it.

This is my scenario :

SET: {
        ID: 102
        TARGETS: {
            DEST: {
                URI: sip:Peer_IP:5060
                FLAGS: AX
                PRIORITY: 0
                ATTRS: {
                    BODY: duid=Peer_01;socket=HA_IP_1:5060
                    DUID: Peer_01
                    MAXLOAD: 0
                    WEIGHT: 0
                    RWEIGHT: 0
                    SOCKET: HA_IP_1:5060
                    SOCKNAME:
                    OBPROXY:
                }
                RUNTIME: {
                    DLGLOAD: 0
                }
            }
            DEST: {
                URI: sip:Peer_IP:5060
                FLAGS: AX
                PRIORITY: 0
                ATTRS: {
                    BODY: duid=Peer_02;socket=HA_IP_2:5060
                    DUID: Peer_02
                    MAXLOAD: 0
                    WEIGHT: 0
                    RWEIGHT: 0
                    SOCKET: HA_IP_2:5060
                    SOCKNAME:
                    OBPROXY:
                }
            }

In this case, HA_IP_1 is on this machine and HA_IP_2 is on another machine.
When dispatcher with loadbalance is called on this scenario, it fails when
choosing Peer_02 as destination.

What i propose is Dispatcher removing Peer_02 from the destination list as
long as HA_IP_2 isn't present on that machine. Is this possible?

A segunda, 12/10/2020, 15:34, Duarte Rocha <duarterocha91 at gmail.com>
escreveu:

> Greetings,
>
> I have two machines with Kamailio in a HA setup with replicated DB. For
> simplicity let's say each machine has one HA IP and that IP can jump to the
> other machine in case something happens (kamailio stopping, etc).
>
> I'm using Dispatcher with load balance configuration. I have Dispatcher
> configured so that each peer has one instance for socket with HA IP 1 and
> HA IP 2.
>
> In order for this to work correctly on the load balance scenario I must
> disable via RPC command the peer which has the socket that doesn't belong
> to the machine. I also must do it every time the IP jumps back and forth,
> which adds complexety to my system.
>
> Does Dispatcher has any sort of help on this? It could not include peers
> with sockets IPs that don't belong to the machine in the destination set,
> for example. Is this possible?
>
> I could also work with failover support but i would rather avoid having so
> many failovers.
>
> Best Regards,A
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201015/76e94242/attachment.htm>


More information about the sr-users mailing list