Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It seems silly to compare these two servers considering that they're meant for very different things. But if you think about it, they can do lots of similar things: store configuration data, distributed locking, queueing, etc.

I've got an instance of Redis that I'm using for some production-related things, but would like to do some simple synchronization between servers (mostly configuration changes that don't require pushing up code and simple locking between servers). What does Zookeeper give me that Redis wouldn't?

share|improve this question
    
Redis is not (specifically) for configuration. They're quite different products. –  Rein Henrichs Jun 11 '11 at 1:44
3  
Why? We are using PostgreSQL for configuration. What makes configuration so different from business logic? –  Dmitry Negoda Jun 11 '11 at 18:03
add comment

1 Answer

up vote 9 down vote accepted

We use both Redis and Zookeeper at work so this is from first hand experience

Redis is fast; really, really fast. It is also immediately consistent, so it's good for fast moving data sets. The downside is that, running on one server, if it fails then you lose write access until another server takes it's place. Replacing the server is a manual operation unless you automate it yourself. (You can still get read access to your data if you configure a slave instance).

Zookeeper also features immediately consistency. It's not half as quick, but it will recover automatically (where possible) in the face of failure, so if you need continuous write access, even when your servers fail on you then you'll want to use Zookeeper.

My advice is, use zookeeper for coordination: tracking which nodes are active, leader election amongst a group, etc. Use redis for datasets that need fast writes but where the occasional outage isn't a disaster. Hit counters for web pages for example.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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