Memcached Session Manager 共享tomcat session设置

wget http://memcached-session-manager.googlecode.com/files/memcached-session-manager-1.6.5.jar
wget http://memcached-session-manager.googlecode.com/files/memcached-session-manager-tc7-1.6.5.jar
wget http://memcached-session-manager.googlecode.com/files/msm-kryo-serializer-1.6.5.jar
wget http://repo1.maven.org/maven2/net/spy/spymemcached/2.10.2/spymemcached-2.10.2.jar
wget http://central.maven.org/maven2/com/couchbase/client/couchbase-client/1.2.2/couchbase-client-1.2.2.jar
wget http://repo1.maven.org/maven2/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar
wget http://repo1.maven.org/maven2/commons-codec/commons-codec/1.5/commons-codec-1.5.jar
wget http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.1.1/httpcore-4.1.1.jar
wget http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore-nio/4.1.1/httpcore-nio-4.1.1.jar
wget http://repo1.maven.org/maven2/io/netty/netty/3.5.5.Final/netty-3.5.5.Final.jar
wget http://repo1.maven.org/maven2/com/googlecode/reflectasm/1.01/reflectasm-1.01.jar
wget http://repo1.maven.org/maven2/com/googlecode/minlog/1.2/minlog-1.2.jar
wget http://repo1.maven.org/maven2/com/googlecode/kryo/1.04/kryo-1.04.jar
wget http://repo1.maven.org/maven2/de/javakaffee/kryo-serializers/0.11/kryo-serializers-0.11.jar
wget http://repo1.maven.org/maven2/asm/asm/3.2/asm-3.2.jar

msm支持 stickty(沾粘会话)和non-sticky(非沾粘会话)两种集群方式,用msm的session管理manager替代tomcat自身的standardManager。
sticky就是前端的loadbanlence能保证每个用户的请求都路由到了同一个tomcat上。
non-sticky则每一次请求都可能路由到了不同的tomcat中。

安装tomcat,mv apache-tomcat-7.0.52 /usr/local/tomcatA,增加 JAR 包,序列策略采用kryo
参考:
    http://code.google.com/p/memcached-session-manager/downloads/list
    http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration
cd /usr/local/tomcatA/lib/

相关推荐