1.vim tomcat/conf/server.xml
remove comment <!--<Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat1">-->
add comment <!-- <Engine name="Catalina" defaultHost="localhost">-->
add a cluster after <Engine name="Standalone" defaultHost="localhost" jvmRoute="tomcat1">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<Manager className="org.apache.catalina.ha.session.BackupManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"
mapSendOptions="6" useDirtyFlag="true"/>
<!--
<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="5000"
selectorTimeout="100"
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"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<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>
2.add <distributable/> to the web.xml of the webapp context
3. notice that all the session object should implment seriabable interace
分享到:
相关推荐
http://618119.com/docs/Tomcat/TomcatCluster.zip 下载解压到Tomcat(例如D:\Java\apache-tomcat-6.0.14)目录里,运行对应的bat文件即可: start15080.bat start16080.bat start17080.bat start18080.bat start...
NULL 博文链接:https://xiaolaogong.iteye.com/blog/1331262
NULL 博文链接:https://kanpiaoxue.iteye.com/blog/1560016
tomcat cluster参考资料3,迷惑几天,还要继续努力,大家共同研究
tomcat7 的集群session共享 案例 亲测可用 无效联系我:351137017
tomcat cluster sync-session利用exp 这是一个tomcat使用了自带会话同步功能时,不安全的配置(没有使用EncryptInterceptor)导致存在的反序列化漏洞,通过精心构造的数据包,可以对使用了tomcat自带会话同步功能的...
tomcat9负载均衡tomcat-cluster-redis-session-manager_4.0
tomcat .how to use mod_jk to design a tomcat cluster
apache + tomcat 集群配置,实现了,负载均衡,session复制。
nginx做请求转发,服务器tomcat解决session不同步问题;步骤:1、解压之后,将jar包放入tomcat的lib中(注意是tomcat/lib中,不是我们自己项目的lib);2、配置解压之后的redis-data-cache.properties(根据你的...
本文是自己所学课程做的一个实验,基于Xen实现Apache及tomcat集群,并进行session测试。首先你要自己已经安装好Xen及虚拟机。
tomcat 8.5.55 集成 tomcat-cluster-redis-session-manager 4.0
分布式web server集群部署后需要实现session共享,针对 tomcat 服务器的实现方案多种多样,比如 tomcat cluster session 广播、nginx IP hash策略、nginx sticky module等方案,本文主要介绍了使用 redis 服务器进行...
网站架构是,通过一个apache+多个tomcat和mysql的结 构。client的安装脚本。
Tomcat集群Redis会话管理器 Redis会话管理器是可插入的。 它将会话存储到Redis中,以便在Tomcat服务器群集之间轻松分配HTTP请求。 在这里,会话被实现为非粘性的(意味着,每个请求都可以转到集群中的任何服务器,...
在不改变工程代码的情况下,使tomcat多个节点利用redis cluster进行session共享.
怎么样搭建nginx+tomcat cluster 且实现负载均衡
nginx+ tomcat + redis-cluster 实现session同步所需的jar包
Tomcat集群Cluster实现原理剖析.doc