# Tomcat Clustering Redis Session Manager The Redis session manager is pluggable one. It stores session into Redis for easy distribution of HTTP Requests across a cluster of Tomcat servers. Here the Sessions are implemented as non-sticky (means, each request can able to go to any server in the cluster, unlike the Apache provided Tomcat clustering setup.) Request Sessions will be stored into Redis immediately (Session attributes must be Serializable), for the use of other servers. When tomcat receives a request from the client, Sessions are loaded directly from Redis. Supports Redis default, sentinel and cluster mode, based on the configuration. Going forward, we no need to enable sticky session (JSESSIONID) in Load Balancer. ## Supports: - Apache Tomcat 7 - Apache Tomcat 8 - Apache Tomcat 9 - Apache Tomcat 10 ## Downloads: [![Total Downloads](https://img.shields.io/github/downloads/ran-jit/tomcat-cluster-redis-session-manager/total.svg)](https://github.com/ran-jit/tomcat-cluster-redis-session-manager/wiki) - [latest version (4.0)](https://github.com/ran-jit/tomcat-cluster-redis-session-manager/releases/tag/4.0) - [older versions](https://github.com/ran-jit/tomcat-cluster-redis-session-manager/wiki)
## Maven configuration ```Property | Description |
---|---|
redis.hosts | Redis server running instance IP address and port number - ex: 127.0.0.1:6379, 127.0.0.2:6379, 127.0.0.2:6380, .. - default: 127.0.0.1:6379 |
redis.password | Redis protected password |
redis.database | Redis database selection. (Numeric value) - default: 0 |
redis.timeout | Redis connection timeout - default: 2000 ms |
redis.cluster.enabled | To enable redis cluster mode - default: false - supported values: true/false |
redis.sentinel.enabled | To enable redis sentinel mode - default: false - supported values: true/false |
redis.sentinel.master | Redis sentinel master name - default: mymaster |
lb.sticky-session.enabled | To enable redis and standard session mode If enabled,
|
session.persistent.policies | session persistent policies. - policies - DEFAULT, SAVE_ON_CHANGE, ALWAYS_SAVE_AFTER_REQUEST
|
redis.sso.timeout | single-sign-on session timeout. - default: 0 ms (-no expiry) |