First I would like to thank Markus Ellinger for contributing Redis support too!
I tried the session-manager with multiple Redis configurations, especially with a small cluster (3 masters, 3 slaves) and a single instance with a single slave.
Using the cluster isn’t working (“JedisMovedDataException”), I expected that.
Accessing the single instance works well, but a failover to the slave isn’t working too. (“JedisConnectionException”).
I’m no expert on Jedis. As far as I can see you have to use a Redis Sentinal in order to support failover and a JedisCluster-Client to support cluster config.
My questions are:
Is it true that cluster and failover aren’t supported yet? Or am I doing something wrong?
Are there any plans on supporting clusters and/or failovers?
And allow me one remark:
If my assumptions are correct, the sentence “Alternatively, you can use a Redis server and Redis' built-in replication.” on the SetupAndConfiguration-page is misleading ;-).
Cheers, Andreas
Hi Markus,
the use case is quite simple (or at least short).
“Requirements”:
- - multiple web-applications
- - high-availability
- - no single point of failure
- - sticky session isn’t possible for several reasons (!)
In my first post I forgot to mention that additionally only one redis node can be configured – memcachedNodes:redis://example.com:123,redis://example.com:124 isn't supported … right? In a non-sticky setup this leads to a single point of failure (redis).
Anyway – our preferred solution is a single redis cluster as session store for all applications, which makes it much easier for us to scale the session store.
We are currently evaluating several alternatives. We probably won’t choose an experimental solution – this means I probably won’t be able to test the sentinel. Sorry. I’ll let you know, if the situation changes.
Anyway – thx a lot so far for the quick responses. I’ll do my best to be quicker next time ;-).
Cheers, Andreas
Hi Markus,
Alternatives to MSM: I tried several session managers with redis (chexagon, jcoleman, pivotal), all of them have restrictions which made it impossible to use them in my context. MSM is definitely the most advanced solution out there and (in my opinion) your decision to use MSM was the right one. We additionally have the option to use spring session, which is of course a total different and more “heavy” approach than a plain tomcat session manager.
Failover in Redis: I’m aware that a redis-slave is needed to achieve automatic failover – setting up slaves isn’t a big deal in redis (even slaves of slaves), so this would be fine for me.
Experimental Solution: With “experimental solution” I meant the support of MSM for redis sentinel referring to your question “If I add support for Redis Sentinel, would you be willing to test it thoroughly?”. I understood, you could add support for redis sentinel to MSM, but testing (of your changes in MSM) should be done by me – this is unfortunately not possible at the moment.
Nevertheless – you probably would make many people happy in contributing redis sentinel/cluster support to MSM ;-).
Thx again,
Cheers
Andreas