Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] Keepalived, localnode and localnode on BACKUP

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


thomas at pedoussaut

Apr 15, 2008, 5:31 AM

Post #1 of 3 (329 views)
Permalink
[lvs-users] Keepalived, localnode and localnode on BACKUP

Hi,

I have a very light infrastructure, with 2 servers acting as directors
AND real servers.

I came across the packet storm problem where when the MASTER forwards a
connection to the real server on the BACKUP (via DR), the BACKUP treats
it as a VIP connection to be loadbalanced rather than a real server
connection to process. And decides to load balance it back to the MASTER
.....

I'm sure there is a way to do it, maybe with iptables. I'm looking for a
schema explaining how a packet coming on an interface traverses the
various layers (ipvs, netfilter, routing) so I could figure out how to
do it.
My chance is that I have 2 physical interfaces, one public and one
private, so if a packet arrives on the private interface for the VIP,
it's a DR from the MASTER, and if it comes on the public, it's
pre-loadbalance traffic.

Another option would be to be sure that the tables are in sync between
the 2 machines so the BACKUP know that the connection has to be directed
locally. I have tried to setup that feature, but it doesn't seems to
sync really.


PS: no arp issues (kernel 2.6 with net.ipv4.conf.all.arp_ignore = 1 and
net.ipv4.conf.all.arp_announce = 2)
PS2: the realserver on the MASTER works fine.
--
Thomas



_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


graeme at graemef

Apr 15, 2008, 5:58 AM

Post #2 of 3 (300 views)
Permalink
Re: [lvs-users] Keepalived, localnode and localnode on BACKUP [In reply to]

Hi

On Tue, 2008-04-15 at 13:31 +0100, Thomas Pedoussaut wrote:
> I came across the packet storm problem where when the MASTER forwards a
> connection to the real server on the BACKUP (via DR), the BACKUP treats
> it as a VIP connection to be loadbalanced rather than a real server
> connection to process. And decides to load balance it back to the MASTER

You need a variant of the following two posts:

http://lists.graemef.net/pipermail/lvs-users/2007-December/020222.html
http://lists.graemef.net/pipermail/lvs-users/2007-December/020223.html

Essentially, you make LVS use fwmarks instead of the VIP, and you only
mark packets which are *not* from the other director.

Graeme


_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


thomas at pedoussaut

Apr 22, 2008, 5:46 AM

Post #3 of 3 (260 views)
Permalink
Re: [lvs-users] Keepalived, localnode and localnode on BACKUP [In reply to]

Graeme Fowler wrote:
> Hi
>
> On Tue, 2008-04-15 at 13:31 +0100, Thomas Pedoussaut wrote:
>
>> I came across the packet storm problem where when the MASTER forwards a
>> connection to the real server on the BACKUP (via DR), the BACKUP treats
>> it as a VIP connection to be loadbalanced rather than a real server
>> connection to process. And decides to load balance it back to the MASTER
>>
>
> You need a variant of the following two posts:
>
> http://lists.graemef.net/pipermail/lvs-users/2007-December/020222.html
> http://lists.graemef.net/pipermail/lvs-users/2007-December/020223.html
>
> Essentially, you make LVS use fwmarks instead of the VIP, and you only
> mark packets which are *not* from the other director.
>

Works like a charm, stable for the last 7 days now.

Thanks
--
Thomas

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users[at]LinuxVirtualServer.org
Send requests to lvs-users-request[at]LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.