<Listener className="org.apache.catalina.security.SecurityListener" checkedOsUsers="root" />
root 계정 실행을 방지하는 기능입니다.
- Connector 튜닝
acceptCount="10"
enableLookups="false"
compression="false"
maxConnection="8192"
maxThread="100"
minSpareThreads="25"
disableUploadTimeout="true"
URIEncoding="UTF-8"
sendReasonPhrase="true"
Connector 속성을 추가하면 톰캣 성능이 개선됩니다.
항목별 세부사항은 별도 검색해서 확인해보시길 바랍니다.
* sendReasonPharse 옵션은 톰캣9 버전부터는 지원되지 않습니다.
- 인스턴스 명칭 부여
<Engine name="Catalina" defaultHost="localhost" jvmRoute="instance1">
jvmRoute를 설정하면 workers.properties를 통해 로드밸런싱을 구성할 수 있습니다.
- 세션 클러스터링
<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">
<Membership className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.4"
port="45564"
frequency="500"
dropTime="3000"/>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto"
port="4000"
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"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=""/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="/tmp/war-temp/"
deployDir="/tmp/war-deploy/"
watchDir="/tmp/war-listen/"
watchEnabled="false"/>
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
세션 클러스터링 기본코드 입니다.
자료 출처 : 출처 : https://tomcat.apache.org/tomcat-8.0-doc/cluster-howto.html#Cluster_Architecture
댓글 없음:
댓글 쓰기