开发者

Redis Configuration

开发者 https://www.devze.com 2023-03-20 16:34 出处:网络
I am contemplating using Redis in my app, and my basic usage needs are high availability, eventual consistency and fast reads/ writes.

I am contemplating using Redis in my app, and my basic usage needs are high availability, eventual consistency and fast reads/ writes.

My usage pattern is something like:开发者_如何学编程

  • Dashboard: Reads & writes to master redis instance.
  • Multiple instances of another app (each running redis clients) and they only read from Redis.

My concerns:

  • What happens if Master goes down?
  • How can I remove that bottle-neck and make it more fault tolerant ?
  • Can I configure a client to look for multiple masters (in some order), so if one is down, it can still use another one as master ?

Any input is welcome!


There will always be a single master accepting writes. However, if your client can detect that the master has failed it is easy enough to promote one of the slaves - just send SLAVEOF NONE to the first slave node before writing.

You will need to update the other slave nodes to use the new master, but you can reduce the impact of this by chaining nodes rather than having all the slaves connected to a single master.


If fault tolerance is a primary concern for you, you might look at Riak.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号