DEVCON 2026    |    2-5 November 2026 – QEII Centre – London, UK    |    Register now! 

Blogs

Tomcat Session Replication with Redis in 7.4

Mariano Alvaro
Mariano Alvaro
4 minuten lezen
If you have taken a quick look to this post and believe that it's going to be a nightmare reading the entire text, good news! You can directly jump to Configuration.

 

Things have changed in 7.4 since the previous post was written. While all the explanation regarding Redis is still valid, classloader configuration is a bit different in Liferay 7.4. Anyway we'll perform a similar introduction. This way if someone directly lands in his blog he/she can find everything self-contained.

 

Redis and Redisson

Redis is an in-memory store that can be used to provide a central and external place to save the application session information. It can be very useful in cloud environments or to handle node crashes without losing session information.

Redisson appears as an alternative in order to provide integration between Redis and Tomcat:

  • Provides a Tomcat Session manager that Stores session of Apache Tomcat in Redis and allows to distribute requests across a cluster of Tomcat servers.
  • Implements non-sticky session management backed by Redis.

It has some advantages like writing only the modified attribute instead of serializing the whole session each time. You have more information in Redisson Tomcat.

 

Default Installation

The following steps are needed for a basic installation:

  1. Add RedissonSessionManager: It can be added both on $TOMCAT_BASE/conf/context.xml or, per context, in $TOMCAT_BASE/conf/server.xml. You have more information in Redisson Tomcat.
    <Manager className="org.redisson.tomcat.RedissonSessionManager"
      configPath="${catalina.base}/redisson.conf" 
      readMode="REDIS" updateMode="DEFAULT" broadcastSessionEvents="false"/>

     

  2. Create, in ${catalina.base}, a redisson.conf
Paginareacties

Related Assets...

Geen resultaten gevonden

More Blog Entries...

David H Nebinger
september 28, 2026
David H Nebinger
september 25, 2026