memcached-session-manager icon indicating copy to clipboard operation
memcached-session-manager copied to clipboard

Session data not copied to node after recovery.

Open JakubDziworski opened this issue 9 years ago • 1 comments

I have a problem non-sticky session configuration:

 <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:host1.yourdomain.com:11211,n2:host2.yourdomain.com:11211"
    sticky="false"
    sessionBackupAsync="false"
    lockingMode="auto"
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
    />

I tested the following scenario:

  1. n1 goes down
  2. there are changes to session being performed
  3. n1 recoveres
  4. n2 goes down
  5. Session does not have changes from point 2

Looks like n2 does not copy data to n1 after n1 is recovered. Is it a bug or am I missing something in configuration?

JakubDziworski avatar Jun 02 '16 09:06 JakubDziworski

As I understand the scenario then the webapp receives a request only at 2, but not between 3 and 4. In this case msm cannot do anything because session replication is passive, i.e. only performed per request. To have active session replication you'd need something like couchbase.

magro avatar Jun 02 '16 20:06 magro