Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO Configure plugin-cfg.xml for Load balancing in WAS5.1.1.10

Status
Not open for further replies.

Neelimaix

Technical User
Jun 29, 2005
23
0
0
US
I am trying to do Load Blancing on two App servers from Apache Webserver.

I was sucessfull partially by geting the round robin load balancing.

the problem is the session that i establish is not paprmenant, i.e for every other click its pointing me to the other app server with out holding the session.

can some one help me on setting up persistant session with load balancing.

Regards,

FYI the plugin file i am using is :
========================

cat plugin-cfg.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">
<Log LogLevel="Trace" Name="/tmp/http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9080"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:9081"/>
<VirtualHost Name="*:9444"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" LoadBalance="Round Robin" Name="Testh_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server ConnectTimeout="0" CloneID="F1234567" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="xxxapp123_server1" ServerIOTimeout="0" WaitForContinue="false">
<Transport Hostname="xxxapp123" Port="9080" Protocol="http"/>
<Transport Hostname="xxxapp123" Port="9443" Protocol="https">
<Property Name="keyring" Value="/opt/WebSphere/AppServer/etc/plugin-key.kdb"/>
<Property Name="stashfile" Value="/opt/WebSphere/AppServer/etc/plugin-key.sth"/>
</Transport>
</Server>
<Server ConnectTimeout="0" CloneID="F1234568" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="xxxapp161_server2" ServerIOTimeout="0" WaitForContinue="false">
<Transport Hostname="xxxapp161" Port="9081" Protocol="http"/>
<Transport Hostname="xxxxapp161" Port="9444" Protocol="https">
<Property Name="keyring" Value="/opt/WebSphere/AppServer/etc/plugin-key.kdb"/>
<Property Name="stashfile" Value="/opt/WebSphere/AppServer/etc/plugin-key.sth"/>
</Transport>
</Server>
<PrimaryServers>
<Server Name="xxxapp161_server2"/>
<Server Name="xxxapp123_server1"/>
</PrimaryServers>
</ServerCluster>
<UriGroup Name="default_host_Test_Cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/pbtwes/*"/>
</UriGroup>
<Route ServerCluster="Test_Cluster" UriGroup="default_host_Test_Cluster_URIs" VirtualHostGroup="default_host"/>
<RequestMetrics armEnabled="false" loggingEnabled="true" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/servlet/snoop"/>
<filterValues enable="false" value="/webapp/examples/HitCount"/>
</filters>
<filters enable="false" type="SOURCE_IP">
<filterValues enable="false" value="255.255.255.255"/>
<filterValues enable="false" value="254.254.254.254"/>
</filters>
</RequestMetrics>
</Config>

 
I had the same problem. This is how I solved it:


"Thanks Sunit, based on your input I managed to get it working with WAS Base. I manually set different HttpSessionCloneId on Web Container custom properties on both servers, as described in:
After that, in the new plugin-cfg.xml, for each server section there was a new property CloneID with the HttpSessionCloneId I set for each server; also, after a WAS restart, the new JSESSIONID's generated contain the CloneID; and now, the webserver doesn't lose it's affinity; so it's ok now.
 
Thanks George,

your input was very helpful
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top