mdevilliers / redishappy

Redis Sentinel high availabillity daemon
Apache License 2.0
114 stars 23 forks source link

redishappy-consul: Demo + Update #55

Closed iamazeem closed 8 years ago

iamazeem commented 8 years ago

Hi, Is there a complete Consul demo for this? The diagram for redishappy-consul needs to be updated. It shows redishappy-haproxy with Consul. Shouldn't it be redishappy-consul?

mdevilliers commented 8 years ago

Sorry about the delay - just got back from holiday.

You are correct about the image - I'll try and get that fixed ASAP - Thanks.

I don't have a demo for Consul - having just used this project to help improve legacy installations of redis. What sort of thing were you looking for?

iamazeem commented 8 years ago

@mdevilliers: You are welcome and thank you for your reply!

Actually, I was looking for a video tutorial by you. BTW, I have a few more questions for you. In the digram, there are three (3) sentinels with two Redis instances (Master / Slave).

  1. Is Consul doing health checks only for Redis the two instances?
  2. If this is the case as in 1 above, what is the actual deployment scenario here? Like, Redis instances are deployed on separate VMs? Where are sentinels running: 1) all on a single VM or 2) each one on a separate VM?
  3. Did you try to consider consul lock for this? You could use Consul KV store for caching also. ;-)

Thanks!

mdevilliers commented 8 years ago

No problem.

Hopefully I can answer your questions below -

  1. Consul isn't health checking the instances. It is providing an SRV record pointing to the correct redis master instance. When the redis master flips the redishappy instance updates the record in consul. The reason why consul isn't health checking the instances is that you can't rely on the redis instance identifiying itself as the master instance - see the FAQ section in the readme.
  2. They should be deployed onto seperate VMs
  3. You might be right - in my use case all I wanted was consul to point to the current redis master.

I hope that all makes sense,

Mark

iamazeem commented 8 years ago

Thanks, Mark! I got the answers.

Well, those are quite a number of VMs there. BTW, I recently came across an amazing project SSDB (http://ssdb.io/) - an alternative to Redis. It provides Master / Master and multi-master replication features. So, each node is a master and contains the exact data as the other node. No switching on failover from Slave to Master. ;-)

You might want to look at it. It might help you reduce the number of VMs and the whole architecture would be simpler. And, adding fabio (https://github.com/eBay/fabio) for load balancing would be quite a blessing. :-)

AZEEM