Reputation:
I have set up a vertical cluster with 2 nodes on a single machine. I have also configured Apache Web Server to both the nodes/server/cluster members. I have also enabled the Session Affinity
by setting IgnoreAffinityRequests=false
in both the webserver. For example, i login with cluster member 1 and then if that member/server fails i need the WebSphere Application Server Network Deployment to redirect the request using the session to another available server. How can i achieve this?
Following is my plugin-cfg.xml for webserver01
<?xml version="1.0" encoding="ISO-8859-1"?><!--HTTP server plugin config file for the webserver localhostCell01.localhostNode01.webserver01 generated on 2016.12.14 at 07:47:15 PM IST-->
<Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="WebserverPort" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" VHostMatchingCompat="false">
<Log LogLevel="Error" Name="c:\Program Files\IBM\WebSphere\Plugins\logs\webserver01\http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<Property Name="ESIEnableToPassCookies" Value="false"/>
<Property Name="PluginInstallRoot" Value="c:\Program Files\IBM\WebSphere\Plugins\"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9080"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:5060"/>
<VirtualHost Name="*:5061"/>
<VirtualHost Name="*:443"/>
<VirtualHost Name="*:9061"/>
<VirtualHost Name="*:9044"/>
<VirtualHost Name="*:9062"/>
<VirtualHost Name="*:9081"/>
<VirtualHost Name="*:9444"/>
<VirtualHost Name="*:9045"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="false" LoadBalance="Round Robin" Name="cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server CloneID="1b3q78g4e" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="localhostNode01_member1" ServerIOTimeout="60" WaitForContinue="false">
<Transport Hostname="localhost" Port="9080" Protocol="http"/>
<Transport Hostname="localhost" Port="9443" Protocol="https">
<Property Name="keyring" Value="c:\Program Files\IBM\WebSphere\Plugins\config\webserver01\plugin-key.kdb"/>
<Property Name="stashfile" Value="c:\Program Files\IBM\WebSphere\Plugins\config\webserver01\plugin-key.sth"/>
</Transport>
</Server>
<Server CloneID="1b3q78ihf" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="localhostNode02_member2" ServerIOTimeout="60" WaitForContinue="false">
<Transport Hostname="localhost" Port="9081" Protocol="http"/>
<Transport Hostname="localhost" Port="9444" Protocol="https">
<Property Name="keyring" Value="c:\Program Files\IBM\WebSphere\Plugins\config\webserver01\plugin-key.kdb"/>
<Property Name="stashfile" Value="c:\Program Files\IBM\WebSphere\Plugins\config\webserver01\plugin-key.sth"/>
</Transport>
</Server>
<PrimaryServers>
<Server Name="localhostNode01_member1"/>
<Server Name="localhostNode02_member2"/>
</PrimaryServers>
</ServerCluster>
<UriGroup Name="default_host_cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/1ppamanager/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/1ppaadmin/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/1ppaauthor/*"/>
</UriGroup>
<Route ServerCluster="cluster" UriGroup="default_host_cluster_URIs" VirtualHostGroup="default_host"/>
<RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/snoop"/>
<filterValues enable="false" value="/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>
<filters enable="false" type="JMS">
<filterValues enable="false" value="destination=aaa"/>
</filters>
<filters enable="false" type="WEB_SERVICES">
<filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
</filters>
</RequestMetrics>
</Config>
Following is plugin-cfg.xml for dmgr profile
<?xml version="1.0" encoding="ISO-8859-1"?><!--HTTP server plugin config file for the cell localhostCell01 generated on 2016.12.14 at 06:53:13 PM IST-->
<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="Error" Name="c:\Program Files\IBM\WebSphere\Plugins\logs\http_plugin.log"/>
<Property Name="ESIEnable" Value="true"/>
<Property Name="ESIMaxCacheSize" Value="1024"/>
<Property Name="ESIInvalidationMonitor" Value="false"/>
<Property Name="ESIEnableToPassCookies" Value="false"/>
<Property Name="PluginInstallRoot" Value="c:\Program Files\IBM\WebSphere\Plugins\"/>
<VirtualHostGroup Name="default_host">
<VirtualHost Name="*:9080"/>
<VirtualHost Name="*:80"/>
<VirtualHost Name="*:9443"/>
<VirtualHost Name="*:5060"/>
<VirtualHost Name="*:5061"/>
<VirtualHost Name="*:443"/>
<VirtualHost Name="*:9061"/>
<VirtualHost Name="*:9044"/>
<VirtualHost Name="*:9062"/>
<VirtualHost Name="*:9081"/>
<VirtualHost Name="*:9444"/>
<VirtualHost Name="*:9045"/>
</VirtualHostGroup>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="false" LoadBalance="Round Robin" Name="cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server CloneID="1b3q78g4e" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="localhostNode01_member1" ServerIOTimeout="60" WaitForContinue="false">
<Transport Hostname="localhost" Port="9080" Protocol="http"/>
<Transport Hostname="localhost" Port="9443" Protocol="https">
<Property Name="keyring" Value="c:\Program Files\IBM\WebSphere\Plugins\etc\plugin-key.kdb"/>
<Property Name="stashfile" Value="c:\Program Files\IBM\WebSphere\Plugins\etc\plugin-key.sth"/>
</Transport>
</Server>
<Server CloneID="1b3q78ihf" ConnectTimeout="5" ExtendedHandshake="false" LoadBalanceWeight="2" MaxConnections="-1" Name="localhostNode02_member2" ServerIOTimeout="60" WaitForContinue="false">
<Transport Hostname="localhost" Port="9081" Protocol="http"/>
<Transport Hostname="localhost" Port="9444" Protocol="https">
<Property Name="keyring" Value="c:\Program Files\IBM\WebSphere\Plugins\etc\plugin-key.kdb"/>
<Property Name="stashfile" Value="c:\Program Files\IBM\WebSphere\Plugins\etc\plugin-key.sth"/>
</Transport>
</Server>
<PrimaryServers>
<Server Name="localhostNode01_member1"/>
</PrimaryServers>
<BackupServers>
<Server Name="localhostNode02_member2"/>
</BackupServers>
</ServerCluster>
<ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="false" LoadBalance="Round Robin" Name="dmgr_localhostCellManager01_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
<Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="localhostCellManager01_dmgr" ServerIOTimeout="0" WaitForContinue="false"/>
<PrimaryServers>
<Server Name="localhostCellManager01_dmgr"/>
</PrimaryServers>
<BackupServers/>
</ServerCluster>
<UriGroup Name="default_host_cluster_URIs">
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/IBM_WS_SYS_RESPONSESERVLET/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/IBM_WS_SYS_RESPONSESERVLET/*.jsp"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/IBM_WS_SYS_RESPONSESERVLET/*.jsv"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/IBM_WS_SYS_RESPONSESERVLET/*.jsw"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/IBM_WS_SYS_RESPONSESERVLET/j_security_check"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/IBM_WS_SYS_RESPONSESERVLET/ibm_security_logout"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/1ppamanager/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/1ppaadmin/*"/>
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/manager/1ppaauthor/*"/>
</UriGroup>
<Route ServerCluster="cluster" UriGroup="default_host_cluster_URIs" VirtualHostGroup="default_host"/>
<RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
<filters enable="false" type="URI">
<filterValues enable="false" value="/snoop"/>
<filterValues enable="false" value="/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>
<filters enable="false" type="JMS">
<filterValues enable="false" value="destination=aaa"/>
</filters>
<filters enable="false" type="WEB_SERVICES">
<filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
</filters>
</RequestMetrics>
</Config>
Upvotes: 0
Views: 810
Reputation: 17872
If the JVM with affinity goes down during the response, or becomes unreachable, or returns a HTTP 503, the WAS WebServer Plugin will send subsequent requests to the other JVM.
If you configure a negative ServerIOTimeout, and the response times out, affinity will also be broken.
The 'failed' JVM can't send the work to the other JVM itself.
Upvotes: 1