4

I tried to find more info about it online, but cant seem to find a fitting answer.

Our new application uses HA loadbalancers on top to distribute visitors to clustered ampq and clustered mysql and everything works flawlessly.

Now we have decided that we need to store our sessions on REDIS and according to everyone out there.. REDIS seems to be a good choice.

But what I dont understand is, since Redis doesnt support cluster yet in production. How do people achieve HA with Redis? Its all great to setup a Master-Slave REDIS setup, but that means I can only write to the master. What happens if the master die? And even with Redis Sentinel promoting slaves to master.. the replication from master to slave can have a delay and reply me with stale data. How do people prevent that?

But to keep it short, I just dont "see" it. Please enlightenment me! Thank you

3 Answers 3

4

Have a look at Twemproxy. It was deisnged to partition data amongst multiple redis masters, so there's no single point of failure; currently, it's the recommended approach to partition redis based on this (scroll to bottom).

Bonus Alert: Here's an interesting article on how to use redis slaves and sentinel with twemproxy, so they all play nice.

3
  • Hi, thanks Twemproxy came close. But we decided to use Riak instead.
    – laapsaap
    Dec 3, 2013 at 17:07
  • that's commercial, though, is there a free version?
    – raffian
    Dec 3, 2013 at 17:10
  • 1
    Riak has a community version and it has support for almost everything. Enterprise supports multi datacenter sharding which community version doesnt have. We figured out we can do a delayed replication to other datacenters because we can afford some delay between remote locations.
    – laapsaap
    Dec 3, 2013 at 23:38
2

try redis-mgr: https://github.com/idning/redis-mgr

redis+twemproxy+sentinel deploy/auto-failover/monitor/migrate/rolling-upgrade

2

Redis 3.x has clustering functionality in the core.

http://redis.io

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.