LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Connecting to VIP from Real Servers.

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Connecting to VIP from Real Servers.
From: Thomas Pedoussaut <thomas@xxxxxxxxxxxxxx>
Date: Thu, 26 Jun 2008 14:53:38 +0100
Stephen Amadei wrote:
> So I have a four box HA and LB UltraMonkey setup... two LBs and two Real 
> servers.
>
> Each Real Server runs HTTP and MySQL.  Both have separate VIP IPs, and I can 
> use them fine from outside the LVS cluster.  I wanted to have the HTTP 
> servers access the MySQL VIP session... but this doesn't work.
>
> Doing a:
>
> mysql -u root -p mysql -h [VIP.ip.address] 
>
> from the real server prompts me for a password and hangs.  Doing a ipvsadm 
> -Lnc shows a connection entry in a SYN_RECV state going from my real server 
> to the VIP and being translated.  
>
> I have tryed this with iptables doing NAT and with it not doing NAT.  
>
> Why would this not work?
>   
I assume you have some sort of web application that uses a database. Why 
not have you're both RS web apps using a MySQL connection to localhost.
Then you modify UltraMonkey to use not a simple tcp check, but a much 
deeper app-levle check, that check as well the db connection. In case of 
an issue with the DB, the RS will be de-activated, and will only remain 
the RS that has a healthy DB connection.

-- 
Thomas


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