LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] failover and connection threshold - fix

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [lvs-users] failover and connection threshold - fix
From: Rumen Bogdanovski <rumen@xxxxxxxxxxxx>
Date: Sat, 27 Oct 2007 15:00:45 +0300
Sorry, forgot to send a copy to the lvs-users list so here it is :)

Hallo all,

This patch fixes the problem with node overload on director fail-over.
Given the scenario: 2 nodes each accepting 3 connections at a time and 2
directors, director failover occurs when the nodes are fully loaded (6
connections to the cluster) in this case the new director will assign
another 6 connections to the cluster, If the same real servers exist
there.

The he problem turned to be in not binding the inherited connections to
the real servers (destinations) on the backup director. Therefore:
"ipvsadm -l" reports 0 connections:
root@test2:~# ipvsadm -l
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  test2.local:5999 wlc
  -> node473.local:5999           Route   1000   0          0         
  -> node484.local:5999           Route   1000   0          0         

while "ipvs -lnc" is right
root@test2:~# ipvsadm -lnc
IPVS connection entries
pro expire state       source             virtual            destination
TCP 14:56  ESTABLISHED 192.168.0.10:39164 192.168.0.222:5999
192.168.0.51:5999
TCP 14:59  ESTABLISHED 192.168.0.10:39165 192.168.0.222:5999
192.168.0.52:5999 

So the patch I am sending fixes the problem by binding the received
connections to the appropriate service on the backup director, if it
exists, else the connection will be handled the old way. So if the
master and the backup directors are synchronized in terms of real
services there will be no problem with server over-committing since 
new connections will not be created on the nonexistent real services 
on the backup. With this patch the inherited connections will show as
inactive on the backup:

root@test2:~# ipvsadm -l
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  test2.local:5999 wlc
  -> node473.local:5999           Route   1000   0          1         
  -> node484.local:5999           Route   1000   0          1         


The patch is based on kernel 2.6.22.10, but patches 2.6.23 also (with
two hunks, but it is not tested on 2.6.23).

The result for 2.6.23.1:
patching file net/ipv4/ipvs/ip_vs_ctl.c
Hunk #2 succeeded at 543 (offset -1 lines).
Hunk #3 succeeded at 580 (offset -1 lines).


Regards,
Rumen Bogdanovski





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