[Serusers] About a SIP load balancing document involving SER

Iñaki Baz Castillo ibc at aliax.net
Wed Oct 15 00:12:35 CEST 2008


El Miércoles, 15 de Octubre de 2008, Martin Hoffmann escribió:

> >   " the trick is to give them all the same IP and have the balancers work
> > one layer below"
> >
> > Do you mean having various LB proxies all of them with same IP? If it,
> > them all the proxies behind the LB's will always see the same source IP,
> > and will reply to that IP, so the responses will arrive, at least, to one
> > LB, am I wrong?
>
> Er, no. You have one load balancer (or, if one isn't enough, a cascade
> of them) and a set of proxies which all use the same address. From an IP
> perspective, the balancers are routers, ie., they don't change IP
> addresses or ports in the packets. All they do is pick one of the
> proxies and forward the packet there. The proxies are set up in such a
> way that they believe to serve the common IP (an alias on loopback,
> usually). Then they just do their usual processing.
>
> > Anyway, I don't understand the purpose and advantages of this method. If
> > I understood correctly, it could occur the following:
> >
> > ---------------------------------------------------------------------
> >   proxy1   proxy2   proxy3    proxy4   proxy5
> >
> >                    LB1         LB2         LB3
> >
> >                                 UA
> > ---------------------------------------------------------------------
> > (all LB's have the same IP (1.1.1.1) in their interface with the proxies
> > behind).
>
> Forget about LB2 and LB3 for now. There is a setup where you can have
> them, but then you need yet another, even dumber balancer in front.
>
> The LB has 1.1.1.1, the proxies have 1.1.1.1 as aliases. So:
> > - UA sends an INVITE to LB1.
> > - LB1 forwards the INVITE to proxy1.
>
> Note: It does not change the IP fragment; ie., IP header, UDP or TCP
> header and SIP message remain untouched.
>
> > - proxy1 sees 1.1.1.1 as source IP so add "received=1.1.1.1" to top Via
> > (the top Via can be Via added by LB1 or the Via added by UA if LB's don't
> > add Via).
>
> - proxy1 sees UA's IP and adds that to the top Via which is UA's Via.
>
> > - proxy1 replies to 1.1.1.1.
>
> - proxy1 replies to UA's IP. You can set this up that this either goes
>   through the LB or directly without the LB seeing the reply. Which of
>   these depends most likely on how smart your balancer is.
>
> > I suppose I didn't understant well since I see no benefict in this
> > scenario.
>
> The benefit is that you can use regular proxies that are unaware of the
> setup. To a certain degree at least -- they do have to share the
> location service, of course.
>
> This setup is the easiest to get a redundant and reliable setup if you
> use NAT handling nathelper style. In that case, the proxies need to know
> the UA's IP and port.
>
> Additionally, you get failover for UDP behind NAT. If proxy1, which was
> processing requests from UA1, fails, proxy2 can take over and still talk
> to the box behind NAT.
>
> The whole thing, obviously, doesn't work for TCP, but that is an
> entirely different can of worms.


Thanks a lot for so great explanation.

So in conclusion we are speaking about an IP based load balancer, and not 
about a SIP load balancer. Also we are playing with IP level exotic technics 
(various hosts sharing the same IP).
So the above scenario would be valid for any UDP protocol, not just SIP.

Again thanks a lot.


-- 
Iñaki Baz Castillo



More information about the sr-users mailing list