首页 > 解决方案 > Can you dynamically resize an ElastiCache cluster with (cluster mode enabled)?

问题描述

According to this doc:

Currently, however, unlike Redis (cluster mode disabled) clusters, once a Redis (cluster mode enabled) cluster is created, its structure cannot be altered in any way; you cannot add or delete nodes or shards. If you need to add or delete nodes, or change node types, you must create the cluster anew. (source)

However, this doc seemingly describes a process to add shards to your cluster:

By using online resharding and shard rebalancing with Amazon ElastiCache for Redis version 3.2.10, you can scale your ElastiCache for Redis (cluster mode enabled) dynamically with no downtime. This approach means that your cluster can continue to serve requests even while scaling or rebalancing is in process. (source)

I'm presumably missing something since I've been staring at this for so long, but what is it?

标签: amazon-web-servicesredisamazon-elasticache

解决方案


ElastiCache 文档已经过时了;即使三年前的文档保持不变,新的公告也会改变可用的内容。ElastiCache 上的 Redis 在 2017 年引入了对在线调整大小的支持。来自公告

您现在可以在集群保持在线并响应请求的情况下调整正在运行的 ElastiCache for Redis 集群中的分片数量。这使您能够响应流量和数据量的变化,而无需使集群脱机或从空缓存开始。您还可以重新平衡正在运行的集群,以在不更改分片数量的情况下均匀地重新分配插槽空间。

我希望他们能更新他们的 2015 (!) 文档,但无论如何,这是我们在这个主题上的最新版本。截至 2018 年 10 月 19 日,在启用了集群模式的集群上:

你可以:

  • 横向扩展(添加分片)
  • 缩小(删除分片)
  • 重新平衡(在分片之间移动键)
  • 在线重分片和分片平衡

你不能:

  • 放大/缩小(更改节点类型)
  • 升级你的引擎
  • 独立配置分片

来源:https ://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/redis-cluster-resharding-online.html


推荐阅读