Comments (3)
This is something that I definitely want to investigate. Over on the sf-ruby mailing list, there is a thread about what happens when there are network partitions, etc. In edge conditions it's possible that two masters could be promoted in flappy IP networks. I think ZooKeeper could address this, although I haven't used it before. I'd really love to eliminate this situation by plugging in ZooKeeper or something similar. What do you think would be involved for this change? Would this make the redis_failover server component obsolete?
from redis_failover.
I would definitely suggest playing around with and deploying zookeeper in production.
I was able to go from 0-to-production in a weekend. I'm only using it for a couple little things that I was previously using redis for, but it makes me feel so much better about life to know that I don't have to worry about a master-slave failover situation for service discovery/configuration data.
I'm a huge fan of zookeeper now.
So... in the simple solution, I don't believe it would obsolete the server component at all — you still need code somewhere to decide who is the master and do the monitoring.
There are a couple cool things that zookeeper could help with, though:
- Provide a way that you can run multiple server components on different systems and have them decide (by an election in zookeeper) which one should actually do the monitoring. The other servers would just wait until the server component who had won the election died and then one of them would win another election and take over.
- Embed the server component in the redis client and allow all of the clients to participate in the election above. The benefit of doing this is that it would remove the need to run Yet Another Thing, but the downside is that it would be more prone to problems in a given ruby process messing things up (imagine a 60 second mysql query blocking MRI for that whole time when a failover happens).
I would definitely think option 1 would be a great start.
from redis_failover.
Closing this issue for now, since communication between RedisFailover::Client and RedisFailover::NodeManager has been implemented with ZooKeeper and heavy use of ZK watchers. Thanks for the original suggestion - you've been called out in the 'Acknowledgements' section of the main README. :)
from redis_failover.
Related Issues (20)
- Full Failure of server HOT 1
- Undefined method 'job' for main object with Resque HOT 4
- Occasionally stale server selection HOT 2
- start-stop-daemon to start redis_failover how to save log
- Add informative procline
- passing in a zk and having it close before redis-failover can trigger an infinite loop
- Prevent reads on slaves HOT 3
- Add subscribing part of Pub/Sub ops to REDIS_READ_OPS
- If ZK has an old master, redis_failover will use it even though the redis instance does not exist HOT 2
- License missing from gemspec
- stuck in "Failed to discover master node" HOT 1
- Shutdown fails with Ruby 2.0 HOT 3
- Error bringing back up failed master HOT 8
- Support Ruby 2.0 HOT 2
- Support Redis 2.8 HOT 1
- Allow Manual Failover in cluster bootstrap
- Redis-failover start up error HOT 1
- Starting redis_node_manager connection timeouts HOT 3
- State of redis_failover HOT 3
- ruby1.9 下启动报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis_failover.