连接到 AWS ElastiCache 复制组只读副本

Connecting to AWS ElastiCache replication group read replicas

使用 AWS-ElastiCache-Redis 的复制组时,有没有办法指定连接到只读副本的首选项?

目标是提供只读访问。

在另一个方向上,很容易更喜欢以一种即使在切换时也保持一致的方式连接到主节点。

From the docs:

For read-only activity, applications can connect to any node in the replication group. However, for write activity, we recommend that your applications connect to the primary endpoint for the replication group instead of connecting directly to the primary node. This will ensure that your applications can always find the current primary node, even if you decide to reconfigure your replication group by promoting a read replica to the primary role.

没有。

一组解决方案依赖于 DNS 以 "preferred" master 作为最不受欢迎的连接来连接到实例,并简单地检查已连接到的实例的状态。由于促销,这不是保证。

slave-allow-chaining,“[d]确定 Redis 中的只读副本是否可以拥有自己的只读副本。”目前是 required to be "no".)

June 2019, there is. AWS calls these "reader endpoints" 开始,它们的功能完全符合人们的预期。