LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] ipvs: add sync_persist_mode flag

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [PATCH] ipvs: add sync_persist_mode flag
Cc: lvs-devel@xxxxxxxxxxxxxxx
From: Aleksey Chudov <aleksey.chudov@xxxxxxxxx>
Date: Sat, 22 Jun 2013 14:20:26 +0300
On 19.06.2013 12:03, Julian Anastasov wrote:
On Tue, 28 May 2013, Aleksey Chudov wrote:

Currently we are using multiple active / standby server pairs and synchronize
them with each other. So half of the servers are constantly doing nothing. We
are searching how to use all the servers in active / active mode while
maintaining high availability and sessions persistence in case of failure of
one of the load balancers. Unfortunately the proposed stateless scheme with SH
scheduler and Sloppy TCP is not suitable for as since we are using WLC and WRR
schedulers. As you mentioned SH scheduler has several drawbacks because of
which we can not use it. Also, we can not synchronize all connections between
all servers, since it would require a lot of memory and the search for such a
huge connection table is likely to be slower.

But we can solve the sync problem in such a way as done in the conntrackd
which allows filtering by flow state. The easiest option is to make the filter
only for IP_VS_CONN_F_TEMPLATE state. Thus if all the load balancers will sync
persistent templates with each other then even if one of the load balancers
fails most users will remain on the same real servers. Of course without the
full sync clients must reestablish TCP connections, but for this case we can
use Sloppy TCP to create a TCP connection state on any TCP packet.

What do you think of this idea?
        Here is something that is compile-tested. You
will need the "ipvs: sloppy TCP and SCTP" patch by
Alexander Frolkin posted on 13 Jun. Let me know if
you need more help in applying and testing such patches,
so that we can be more confident when releasing such
optimization officially.

From: Julian Anastasov <ja@xxxxxx>
[PATCH] ipvs: add sync_persist_mode flag

Add sync_persist_mode flag to reduce sync traffic
by syncing only persistent templates.



I tested the changes on one pair of LAN servers. After turning on sync_persist_mode synchronization traffic decreased by 4 times! Also on LVS Backup I can see only persist connections.

First of all the Kernel on both servers have been updated. Then LVS Backup has been rebooted to drop all connections. After the reboot sync was disabled and all connections counters was zero. When I enabled sync again almost all persist connections from LVS Master have been synced to LVS Backup. But also I can see 0.04% of the connections in ESTABLISHED state, although they should not be there! After disabling sync all connections on LVS Backup completely disappear after about 5 minutes.

After turning on sloppy_tcp IP address have been moved from LVS Master to LVS Backup. According to our statistics, most on clients remained on the same real servers. I don't see any problems with sloppy_tcp.

Aleksey
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>