预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共14页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

TOMCAT群集实现负载均衡1.环境介绍2.实验方案3.实现过程在配置文件的末尾加上: ProxyRequestsOff ProxyPass/balancer://myclusterstickysession=jsessionidnofailover=On <Proxybalancer://mycluster> BalancerMemberhttp://127.0.0.1:9080 BalancerMemberhttp://127.0.0.1:10080 </Proxy> <Location/balancer-manager> SetHandlerbalancer-manager OrderDeny,Allow Denyfromall Allowfromall </Location> <Location/server-status> SetHandlerserver-status OrderDeny,Allow Denyfromall Allowfromall </Location> 3.实现过程Tomcat1的配置: <Serverport="9005"shutdown="SHUTDOWN"> <Connectorport="9080"protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/> <Connectorport="9009"protocol="AJP/1.3"redirectPort="8443"/> <Hostname="localhost"appBase="webapps" unpackWARs="true"autoDeploy="true" xmlValidation="false"xmlNamespaceAware="false"> 添加在<Host></Host>之间 <ClusterclassName="org.apache.catalina.ha.tcp.SimpleTcpCluster"channelSendOptions="6"> <ManagerclassName="org.apache.catalina.ha.session.BackupManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true" mapSendOptions="6"/> <ChannelclassName="org.apache.catalina.tribes.group.GroupChannel"> <MembershipclassName="org.apache.catalina.tribes.membership.McastService" address="224.0.0.1" port="45564" frequency="500" dropTime="3000"/> <ReceiverclassName="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="5001" selectorTimeout="100" maxThreads="6"/> <SenderclassName="org.apache.catalina.tribes.transport.ReplicationTransmitter"> <TransportclassName="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/> </Sender> <InterceptorclassName="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/> <InterceptorclassName="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/> <InterceptorclassName="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/> </Channel> <ValveclassName="org.apache.catalina.ha.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt