정적 IP를 이용한 Apache Tomcat 세션 클러스터링 설정

Tomcat 8 기준


server.xml

<Engine name="Catalina" defaultHost="localhost">
.
.
.
  <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
           channelSendOptions="8">
 
    <Manager className="org.apache.catalina.ha.session.DeltaManager"
             expireSessionsOnShutdown="false"
             notifyListenersOnReplication="true" />
 
    <Channel className="org.apache.catalina.tribes.group.GroupChannel">
      <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                address="auto"
                port="XXXX"
                autoBind="100"
                selectorTimeout="5000"
                maxThreads="6" />
 
      <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
        <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" />
      </Sender>
 
      <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector" />
 
      <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor" />
 
      <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor" />
 
      <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
        <Member className="org.apache.catalina.tribes.membership.StaticMember"
                host="XXX.XXX.XXX.XXX"
                port="XXXX"
                domain="tomcat-cluster"
                uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}" />
      </Interceptor>
    </Channel>
 
    <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
           filter="" />
 
    <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve" />
 
    <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener" />
  </Cluster>
.
.
.
</Engine>


댓글(0)

Designed by JB FACTORY