LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Monitoring real servers from the kernel

To: "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Monitoring real servers from the kernel
From: "Rief, Jacob" <Jacob.Rief@xxxxxxxxxxxx>
Date: Fri, 8 Jun 2001 12:48:20 +0200
Hi,
even if this now is becoming a boring question, and even if
its already handled by the documentation I would like to
suggest the following method for monitoring:
Just to explain what I am doing in ldirectord for http:

Every second on the real server I try to open a socket on port
80 and immediatly close it. If that fails, ldirectord takes
the real server out.
Every 30 seconds ldirectord does a real HTTP-request and checks
if the result is correct. The first method does not pollute
the web-server logfiles, the second can be used to check integrety, but
is much slower and creates much more overhead. Therefore
I do it only all 30 seconds.

I agree that there is nothing the kernel can do, such as the second check.
But the first one (socket-alive) can be avoided. I try to explain how:


               typical TCP/IP connection

Time         Client                    Server    Comment
  |             |                         |
  v             |----- SYN isn1 --------->|    initiate connection
                |<- SYN isn2 ACK isn1+1 --|    this my not pass through the
LB
                |                         |
** CHECK HERE:  |----- ACK isn2+1 ------->|
                |                         |
                |<----- ACK, DATA ------->|    
                |<----- ACK, DATA ------->|    
                        .........
                |<----- ACK, DATA ------->|    
                |                         |
                |------ FIN isn3 -------->|                    
                |<---- ACK isn3+1 ------->|    
                |<---- FIN isn4 --------->|    
                |------ ACK isn4 -------->| 


What the LB could do is to check the timediff between "SYN isn1" and "SYN
isn2 ACK isn1+1".
But this packet may not return through the LB, when configured as tunnel or
gate.
But LVS could check for "ACK isn2+1". If that time expires, You can bet that
the real server
is dead. Then You may set its weight to lets say -weight and give the
responsability to 
the monitoring software, which may readd the realserver after is came back.

I think it should not be too difficult to implement this, or am I wrong?

Jacob


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