2016-12-14 93 views
0

我已經在單臺機器上設置了具有2個節點的垂直羣集。我還將Apache Web Server配置到節點/服務器/集羣成員。我還通過在網絡服務器中設置IgnoreAffinityRequests=false來啓用Session Affinity。例如,我使用集羣成員1登錄,然後如果該成員/服務器失敗,我需要WebSphere Application Server Network Deployment將使用會話的請求重定向到另一個可用服務器。我怎樣才能做到這一點?將請求重定向到羣集中的另一臺服務器

以下是我的plugin-cfg.xml的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> 

以下是的plugin-cfg.xml爲DMGR輪廓

  <?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> 

回答

2

如果JVM的響應過程中具有親和力下降,或變得無法訪問,或者返回一個HTTP 503,WAS WebServer Plugin會將後續請求發送給其他JVM。

如果您配置否定的ServerIOTimeout,並且響應超時,親和力也將被破壞。

「失敗」的JVM無法將工作發送給其他JVM本身。

+0

對於這兩個Web服務器,「ServerIOTimeout」均爲60。 –

相關問題