1.failoverNodes (optional, must not be used for non-sticky sessions)
This attribute must contain the ids of the memcached nodes,
that shall not be used by this tomcat for session backup, but only if no other memcached nodes are available. Therefore, you should list those memcached nodes, that are running
on the same machine as this tomcat. Several memcached node ids are separated by space or comma. For non-sticky sessions failoverNodes must not be specified as a session is not tied to a single tomcat. For membase buckets this attribute should also be left out.
2.I have several (sticky) tomcats and memcached nodes, how shall I configure failoverNodes for each tomcat?
failoverNodes are for setups where some tomcats and memcacheds are running on the same machine. When the machine serving a tomcat crashes the session can only be served by another tomcat when the session is stored in a memcached running on a different machine. So a tomcat shall write sessions preferrably to memcacheds running on other machines, and store sessions only in a memcached running on the same machine when no other memcached is available. That's the meaning of failoverNodes.
Some examples:
Example
machines m1, m2
tomcats t1, t2 on m1, t3, t4 on m2
memcached nodes n1 on m1, n2 on m2
-> failoverNodes for t1 and t2 = n1, failoverNodes for t3 and t4 = n2
Example
machines m1, m2, m3, m4
tomcats t1 on m1, t2 on m2, t3 on m3 and t4 on m4
memcaches n1 on m1, n2 on m2, n3 on m3, n4 on m4
-> t1.failoverNodes = n1, t2.failoverNodes = n2, t3.failoverNodes = n3, t4.failoverNodes = n4
Example
machines m1, m2, m3, m4
tomcats t1 on m1, t2 on m2
memcacheds n1 on m3, n2 on m4
-> t1.failoverNodes and t2.failoverNodes = <empty> (not needed in this case)
3.How are memcached nodes selected for session backup?
When a new session is created the memcached-session-manager selects the memcached node randomly.
4.session backup
session backup就是在sticky sessions下,把session存储到memcached中,与failoverNodes无关。
分享到:
相关推荐
压缩包内的"memcached-session-manager-tc7-tc8-1.9.6"文件可能包含了`memcached-session-manager`的1.9.6版本,包括适用于Tomcat 7和8的配置文件和依赖库。为了使用这个库,开发者需要在Tomcat的`context.xml`或`...
memcached-1.9.6,libevent-2.1.12-stable.tar memcached-session-manager-1.9.6,msm-kryo-serializer-1.9.6.jar,tomcat8.5,实现会话共享
"memcached-session-manager" 是一个与Web应用程序相关的组件,它主要用于管理用户的会话(session)。Memcached 是一个高性能、分布式内存对象缓存系统,常用于减轻数据库的负载,通过将数据存储在内存中来加速访问...
为了优化这个问题,我们可以使用`memcached-session-manager`,它是一个专门为Tomcat设计的插件,使得Tomcat能够将用户的session数据存储在Memcached服务器上,实现session的分布式管理。 本文将详细介绍如何在...
"memcached(十一)memcached-session-manager" 这个标题指的是一个关于memcached缓存系统与session管理的系列教程的第十一部分。在这个教程中,重点可能是如何使用memcached来存储和管理Web应用中的session数据,以...
【标题】:“Memcached-session-manager所需最新jar包-tomcat7-kryo序列”指的是在Tomcat7中使用Memcached作为会话管理器时,需要的特定版本的jar包,特别是与Kryo序列化相关的组件。 【描述】:“Memcached-...
Memcached-session-manager使用说明及相关jar包(tomcat7版) 依照文档部署即可实现多服务器多tomcat session共享,jar包中是tomcat7集成所需要的jar包,序列化工具用的是java默认的序列化工具,若要使用其他版本的...
memcached-session-manager-1.6.5.jar
本lib包包含:javolution-5.5.1.jar、kryo-1.03.jar、kryo-serializers-0.10.jar、memcached-2.5.jar、memcached-session-manager-1.5.1.jar、memcached-session-manager-tc7-1.5.1.jar、minlog-1.2.jar、msm-...
标题 "nginx集成memcached-session-manager所需要的jar" 涉及到的是将Nginx服务器与MemcachedSessionManager组件结合使用的主题。Nginx是一款高性能的HTTP和反向代理服务器,而Memcached则是一个分布式内存对象缓存...
memcached-session-manager-tc6-1.6.3.jar
"memcached-session-manager_4_tomcat8" 这个标题表明我们正在讨论一个针对Tomcat 8.0.33版本的session管理器,它使用了memcached作为持久化存储。memcached是一种分布式内存对象缓存系统,常用于减轻数据库负载,...
memcached-session-manager-tc7
完全可以根据github的要求来配置,我只是没分了~ 官网地址:https://github.com/magro/memcached-session-manager/wiki/SetupAndConfiguration#add-memcached-session-manager-jars-to-tomcat
适应MSM的整合包,有 flexjson-3.3 msm-flexjson-serializer-1.9.6 msm-spymemcached-2.11.3 memcached-session-manager-1.9.6 memcached-session-manager-tc8-1.9.6
memcached-session-manager-tc7-1.6.5.jar