LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Persistence and load balancing with Oracle

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Persistence and load balancing with Oracle
From: "Anthony Brock" <Anthony_Brock@xxxxxxx>
Date: Tue, 01 Jul 2003 10:18:39 -0700
First, I would like to say thank you! The LVS software is quite impressive.

Second, I'm having a problem finding the best approach for load-balancing our 
Oracle service. Specifically, I would have the persistence template created for 
the initial Oracle authentication period and then expire out of existence 
(allowing other connections from this IP address to be load-balanced). My 
situation follows:

We have LVS functioning in front of two Oracle servers running 9iAS (web 
interface through Apache). If I understand the progression, a typical client 
connection proceeds as follows:

1. Client opens connection (1 connection, opened and immediately closed)
2. Server offers JInitiator (1-2 connections, opened and immediately closed)
3. Once client has confirmed the correct version, JInitiator launches a java 
applet. This opens and closes 1 or 2 connections before "establishing" a 
connection for login.
4. Client logins (1 connection opened and closed for each failed attempt).
5. Client established a permanent session (1 connection that remains open for 
the duration of the session).

Overall, I'm seeing between 5 and 15 connections in less than 2 minutes for 
each client to the load-balancer. Once they're logged in, they maintain an 
established connection until they disconnect (oracle sends a "heart-beat" that 
allow the connection to be refreshed every 15 minutes).

Here's the problem. If I chose "source hash" for our load-balancing algorithm, 
it appears that some of our clients (using NAT/PAT behind a single IP address) 
will only be directed to a single back-end server. This effectively eliminates 
much of the usefulness of LVS.

If I chose "round-robin", the clients are not able to establish an Oracle 
session. The Oracle Java applet does not like being bounced between back-end 
servers during the authentication phase. As a work-around, we have turned on 
persistence (30 minutes) for the round-robin algorithm. Also, to keep the 
established sessions active with the 15 minute oracle heart-beat, we've 
increased the TCP Idle timeout from 15 minutes to 16 minutes.

This initially appeared to resolve our problems. However, I now realize that 
the persistent templates are "refreshed" every time there is activity on the 
established connection. Is there a way to turn this off? This will allow us to 
maintain persistence during the first 2 or 3 minutes of the session (while it 
is needed). Once established, persistence can expire and allow subsequent 
connections to be load balanced.

Thanks!

Tony

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