amazon-web-services - 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?
解决方案
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
推荐阅读
- vue.js - Safari 上未显示 Vuetify mdi 图标
- javascript - 如何在反应中将道具传递给多级组件?
- javascript - 脚本未从外部文件加载 css 属性
- postgresql - PostgreSQL Group By 查询结果不显示组值,只显示列名
- python - 如何使用python创建一个可以用来打开其他文件的应用程序?
- node.js - 事务中的MongoDB更新
- java - 无法开始加载 Logstash 配置文件
- php - Laravel 模型突然使用没有复数的默认表名
- python-3.x - 用于具有行间和定义函数的分组数据的 Python For 循环
- regex - 反馈答案的正则表达式超过 10 字(谷歌表格)