LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Persistence and load balancing with Oracle

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Persistence and load balancing with Oracle
From: "Anthony Brock" <Anthony_Brock@xxxxxxx>
Date: Tue, 01 Jul 2003 10:24:59 -0700
Please ignore this request. After talking it through with my DBA, it appears 
that I'm mistaken. The applet establishes/closes a new connection for EVERY 
request (button click, etc). Thus, the default behavior with persistence is 
likely what we need.

Sorry for wasting your time,

Tony


>>> Anthony_Brock@xxxxxxx 07/01/03 10:18AM >>>
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

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx 
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx 
or go to http://www.in-addr.de/mailman/listinfo/lvs-users

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