Subject: [lvs-users] Real and Fallback in Piranha

From: "Sean Drill" <[email-masked]>
Date: Wed, 4 Mar 2009 09:00:22 +0900

Hey there
 
I am attempting to upgrade our internal load balancing system from
ldirectord to lvs with the Piranha front end. As we currently run our
system, we have two servers each running ldirectord/heartbeat, we have
active/standby servers for load balancing, but we also run the virtual
servers as active/standby (or real/fallback in the ldirectord
terminology)
 
I have been able to replicate the active/standby for the servers, but
cannot see how I can do active/standby with the virtual servers. I
attempted to set one of the real servers to a priority of 0 and the
other priority 1 whilst using WRR as the load balancing method.
Strangely I still continued to see connections directed to the server
with the priority of 0, which runs in direct contradiction to how I
understanding the priority system works (I understood priority 0 means
accept no new connections)
 
Anyone who can offer some assistance would be greatly appreciated.
 
Regards,
Sean

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

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

---

From: Joseph Mack NA3T <[email-masked]>
Date: Tue, 3 Mar 2009 17:36:39 -0800 (PST)

> ldirectord to lvs with the Piranha front end.

> Anyone who can offer some assistance would be greatly appreciated.

There's some perspective on Piranha in the HOWTO

Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

---

From: "Sean Drill" <[email-masked]>
Date: Wed, 4 Mar 2009 12:11:53 +0900

I have read through the howto located at
http://www.redhat.com/support/resources/howto/piranha/ it does not seem
to offer any real insight into the problem I am facing. 

If there is another HOWTO you are referring to, please direct me to it
so I can have a read.

- Sean 

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]] On Behalf Of Joseph
Mack NA3T
Sent: Wednesday, 4 March 2009 10:37 AM
To: LinuxVirtualServer.org users mailing list.
Subject: Re: [lvs-users] Real and Fallback in Piranha

Joe

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina jmack (at) wm7d (dot)
net - azimuthal equidistant map generator at
http://www.wm7d.net/azproj.shtml Homepage http://www.austintek.com/ It's
GNU/Linux!

---

From: Sebastian Vieira <[email-masked]>
Date: Wed, 4 Mar 2009 08:10:45 +0100

> accept no new connections)

Take a look at
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.persistent_connection.html#new_persistence

It's probably what you're looking for.

Sebastian

---

From: "Sean Drill" <[email-masked]>
Date: Wed, 4 Mar 2009 17:07:03 +0900

I believe I may not have explained myself quite clearly, so I will
attempt to  explain this better.

Our current configuration is configured using ldirectord. The active
node hosts all the virtual servers. Each virtual server will have an
active real server, and a backup real server. All the traffic will be
directed to the active real server, unless that server becomes
unreachable, at which point all traffic will be directed to the backup
server.

I am however only able to get piranha/lvs to do load sharing. In this
case as long as both servers are set to UP, then traffic will be
balanced between all servers (determined by load balancing scheme and
weighting.) What I am attempting to do is create a virtual server in
LVS, which has two active REAL servers, however direct traffic only to
one of them, unless otherwise directed or if the active member fail,
then direct traffic to the backup.

I hope this is a little clearer

Regards

- Sean 

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]] On Behalf Of Sebastian
Vieira
Sent: Wednesday, 4 March 2009 4:11 PM
To: LinuxVirtualServer.org users mailing list.
Subject: Re: [lvs-users] Real and Fallback in Piranha

> accept no new connections)

Take a look at
http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.persistent_connec
tion.html#new_persistence

Sebastian

---

From: Graeme Fowler <[email-masked]>
Date: Wed, 04 Mar 2009 09:35:54 +0000

On Wed, 2009-03-04 at 17:07 +0900, Sean Drill wrote:
> I am however only able to get piranha/lvs to do load sharing.

Unfortunately this is the wrong list to ask about usage of Piranha -
there's a separate list for RedHat's tools:

https://www.redhat.com/mailman/listinfo/piranha-list

...but as I've said before on this list, it's pretty quiet there.

With no knowledge whatsoever of Piranha I'd say you could go a long way
towards achieving your aim by using WRR with weights of (say) 9999 for
one server, and 1 for the other. It won't be a completely hot/cold
system but it will get fairly close.

Graeme

---

From: Joseph Mack NA3T <[email-masked]>
Date: Wed, 4 Mar 2009 04:25:17 -0800 (PST)

> If there is another HOWTO you are referring to, please direct me to it

LVS HOWTO

Joe

---

From: Thomas Pedoussaut <[email-masked]>
Date: Wed, 04 Mar 2009 15:15:42 +0000

> then direct traffic to the backup.

The behaviour you want is achieved with a sorry server. Basically, the
first RS is on it's own in the pool, and the second RS is defined as a
sorry server, or failback, depending on the vocabulary.

Here is an example using keepalived. The first virtual service (fwmark
10) is a load balancing across the 2 RS, and the second (fwmark 11) is
in active/passive. Keep in mind to also detect failure of the backup RS
to be able to repare it before you need to use it.

virtual_server fwmark 10 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    protocol TCP

    real_server 172.31.241.64 3306 {
        weight 100
        MISC_CHECK {
        misc_path "/usr/local/bin/check_mysql2.sh 172.31.241.64"
        misc_timeout 10
        misc_dynamic
        }
    }
    real_server 172.31.241.66 3306 {
        weight 100
        MISC_CHECK {
        misc_path "/usr/local/bin/check_mysql2.sh 172.31.241.66"
        misc_timeout 10
        misc_dynamic
        }
     }
}

virtual_server fwmark 11 {
    delay_loop 6
    lb_algo wlc
    lb_kind DR
    protocol TCP

    sorry_server 172.31.241.66 3306

    real_server 172.31.241.64 3306 {
        weight 100
        MISC_CHECK {
        misc_path "/usr/local/bin/check_mysql_fo.sh 172.31.241.64"
        misc_timeout 10
        }
    }
}

-- 
Thomas

---

From: "Tim Bourne" <[email-masked]>
Date: Wed, 4 Mar 2009 13:55:31 -0600

Would another valid approach be to set up your real servers in a
heartbeat config with the 'real IP' failing between them?  I know it
adds another level of configuration/complexity, but I think it would
accomplish what you're looking for.

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]] On Behalf Of Thomas
Pedoussaut
Sent: Wednesday, March 04, 2009 9:16 AM
To: LinuxVirtualServer.org users mailing list.
Subject: Re: [lvs-users] Real and Fallback in Piranha