https://docs.jelastic.com/replication-memcached/



1. Jar files attached need adding in both server libs


2. context xml in all servers needs below adding (NOTE CHAGE THE host TO THE IP OF THE MEMCACHE INSTANCE)


 <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"

   memcachedNodes="n1:10.10.123.116:11211"

   requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$"

   sessionBackupAsync="false"

   sessionBackupTimeout="100"

   copyCollectionsForSerialization="false"/> 


3. haproxy config needs below after server webserver entries in backend


#---------test additions for clustering TT

stick-table type string len 52 size 5M expire 30m

stick store-response set-cookie(JSESSIONID)

stick on cookie(JSESSIONID)

cookie JSESSIONID prefix nocache