아주 잘 정리된 문서를 보면 꼭 스크랩해 놓고싶다.
더군다나 이해하기 쉽게도 적어놓으셨다.
대단하신 분인듯
1.설치환경
2.Apache Web server설정
3.Tomcat Application Server 설정
4.Web Application에 Clustering이 가능하도록 설정
5.Clustering Test
추가)
1. apache 1.2.7버전이후로
worker.loadbalancer.balanced_workers=tomcat1,tomcat2
–> worker.loadbalancer.balance_workers=tomcat1,tomcat2
2. mod_jk의 라우팅 로그를 보려면 httpd.conf 파일에
JkRequestLogFormat “%w %R %V %T %U %s” 옵션을 추가하자
[workers.properties]
worker.list=loadbalancer worker.tomcat1.type=ajp13 worker.tomcat1.host=localhost worker.tomcat1.port=8009 worker.tomcat1.lbfactor=1 worker.tomcat2.type=ajp13 worker.tomcat2.host=localhost worker.tomcat2.port=8010 worker.tomcat2.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=tomcat1,tomcat2
[httpd.conf]
LoadModule jk_module modules/mod_jk.so <IfModule jk_module> JkWorkersFile conf/workers.properties JkLogFile logs/jk.log JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkRequestLogFormat "%w %R %V %T %U %s" JkMount /*.jsp loadbalancer JkMount /*.js loadbalancer JkMount /*.do loadbalancer JkMount /*.html loadbalancer JkMount /servlet/* loadbalancer JkMount /*.gif loadbalancer JkMount /*.png loadbalancer JkMount /*.jpg loadbalancer </IfModule>
[web.xml]
<web-app> <distributable/> </web-app>
[server.xml]
<Engine defaultHost="localhost" name="Catalina" jvmRoute="tomcat1"> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/> <Context docBase="MES" path="/MES" reloadable="true" source="org.eclipse.jst.jee.server:MES"/></Host> </Engine>