Redis 集群 - 生产准备好了吗? [英] Redis Cluster - production ready?

查看:20
本文介绍了Redis 集群 - 生产准备好了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读 Redis 文档,我对分区功能最感兴趣.

I was reading Redis documentation, and I am most interested in the partitioning feature.

Redis 文档声明如下:

数据存储还是缓存?使用 Redis 和数据存储时进行分区或缓存在概念上是相同的,但是有很大的不同.当 Redis 用作数据存储时,您需要确保给定的键总是映射到同一个实例,当 Redis 用作如果给定节点不可用,则缓存不是大问题,如果我们开始使用不同的节点,按照我们的意愿改变键实例映射提高系统的可用性(即系统回复我们的查询).一致的散列实现如果某个节点的首选节点,通常能够切换到其他节点给定的密​​钥不可用.同样,如果你添加一个新节点,部分新密钥将开始存储在新节点上.主要概念这是以下内容:如果 Redis 用作缓存,则向上和向下扩展使用一致散列很容易.如果Redis用作存储,我们需要取固定的键和节点之间的映射,以及固定数量的节点.否则我们需要一个能够重新平衡密钥的系统当我们添加或删除节点时,在节点之间,目前只有 RedisCluster 能够做到这一点,但 Redis Cluster 尚未做好生产准备.

Data store or cache? Partitioning when using Redis ad a data store or cache is conceptually the same, however there is a huge difference. While when Redis is used as a data store you need to be sure that a given key always maps to the same instance, when Redis is used as a cache if a given node is unavailable it is not a big problem if we start using a different node, altering the key-instance map as we wish to improve the availability of the system (that is, the ability of the system to reply to our queries). Consistent hashing implementations are often able to switch to other nodes if the preferred node for a given key is not available. Similarly if you add a new node, part of the new keys will start to be stored on the new node. The main concept here is the following: If Redis is used as a cache scaling up and down using consistent hashing is easy. If Redis is used as a store, we need to take the map between keys and nodes fixed, and a fixed number of nodes. Otherwise we need a system that is able to rebalance keys between nodes when we add or remove nodes, and currently only Redis Cluster is able to do this, but Redis Cluster is not production ready.

从最后一句话我了解到 Redis Cluster 尚未做好生产准备.有谁知道这个文档是否是最新的,或者 Redis Cluster 是否已经准备好生产?

From the last sentence I understand that Redis Cluster is not production ready. Does anyone knows whether this documentation is up to date, or Redis Cluster is already production ready?

推荐答案

[更新] Redis Cluster 发布于Redis 3.0.0 2015 年 4 月 1 日.

[Update] Redis Cluster was released in Redis 3.0.0 on 1 Apr 2015.

Redis 集群目前正在积极开发.请参阅 Redis 作者:Antirez 中的这篇文章.

Redis cluster is currently in active development. See this article from Redis author: Antirez.

所以我可以暂停其他增量改进,专注于 Redis 集群.基本上,我的计划主要是在没有达到 Beta 质量的情况下进行集群工作,而对于 Beta 质量,我的意思是勇敢的用户可能会将其投入生产.

So I can pause other incremental improvements for a bit to focus on Redis Cluster. Basically my plan is to work mostly to cluster as long as it does not reach beta quality, and for beta quality I mean, something that brave users may put into production.

Redis 集群将支持最多~1000 个节点.

Redis Cluster will support up to ~1000 nodes.

第一个版本将具有以下功能(摘自 Antirez 帖子):

The first release will have the following features (extracted from Antirez post):

  1. 密钥空间的自动分区.
  2. 热重新分片.
  3. 仅支持单键操作(而且永远都是这样).
  1. Automatic partition of key space.
  2. Hot resharding.
  3. Only single key operations supported (and it will always be that way).

截至今天,antirez 正在开发第一个 Redis 集群客户端 (redis-rb-cluster) 以用作参考实现.

As of today antirez is working on the first Redis cluster client (redis-rb-cluster) in order to be used as a reference implementation.

一旦 Redis Cluster 投入生产,我就会更新这个答案.

I'll update this answer as soon as Redis Cluster goes production ready.

[更新] 03/28/2014 Redis 集群已经在生产中的大型集群上使用(来源:antirez 推文).

[Update] 03/28/2014 Redis Cluster is already used on large cluster in production (source: antirez tweets).

这篇关于Redis 集群 - 生产准备好了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆