0

ロード バランサーには 4 つのサーバーがあり、Tomcat 5.5 が使用されています。以下の点は、Tomcat クラスタリングの設定でカバーされていますが、それでもセッション レプリケーションは正しく行われません。

  1. セッション属性が実装されましたjava.io.Serializable
  2. 要素のコメントを外し、server.xmlのCluster要素Valve(ReplicationValve)
  3. Web.xml<distributable/>要素を持っています
  4. <Engine name="Catalina" jvmRoute="node01"> 4 つのサーバーすべてで一意の値に設定されます。
  5. Loadbalancerスティッキー セッション モードに設定されています。

    <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
             managerClassName="org.apache.catalina.cluster.session.DeltaManager"
             expireSessionsOnShutdown="false"
             useDirtyFlag="true"
             notifyListenersOnReplication="true">
    
        <Membership 
            className="org.apache.catalina.cluster.mcast.McastService"
            mcastAddr="228.0.0.4"
            mcastPort="45564"
            mcastFrequency="500"
            mcastDropTime="3000"/>
    
        <Receiver 
            className="org.apache.catalina.cluster.tcp.ReplicationListener"
            tcpListenAddress="auto"
            tcpListenPort="4001"
            tcpSelectorTimeout="100"
            tcpThreadCount="6"/>
    
        <Sender
            className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
            replicationMode="pooled"
            ackTimeout="15000"/>
    
        <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
               filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
    
        <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                  tempDir="/tmp/war-temp/"
                  deployDir="/tmp/war-deploy/"
                  watchDir="/tmp/war-listen/"
                  watchEnabled="false"/>
    </Cluster>
    
4

0 に答える 0