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
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.
try redis-mgr: https://github.com/idning/redis-mgr
redis+twemproxy+sentinel deploy/auto-failover/monitor/migrate/rolling-upgrade
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With