【发布时间】:2020-02-06 16:08:01
【问题描述】:
我需要公开我的 Redis ReplicationGroup 的 Reader Endpoint,以便相关 CloudFormation 堆栈可以使用它。
我之前使用过主端点,它可用作 CloudFormation 返回值,但我现在需要使用 2019 年 6 月推出的 Reader Endpoint [https://aws.amazon.com/about-aws/whats-new/2019/06/amazon-elasticache-launches-reader-endpoint-for-redis/]。
但是读取器端点没有出现在 CloudFormation 文档的返回值中 [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html]
我的堆栈输出定义为:
MyReplicationGroup.PrimaryEndPoint.Address
MyReplicationGroup.PrimaryEndPoint.Port
Reader Endpoint 是否可用,但尚未记录?也许以下就是我所需要的?
MyReplicationGroup.ReaderEndPoint.Address
MyReplicationGroup.ReaderEndPoint.Port
我宁愿不使用 ReadEndPoint.Addresses 和 ReadEndPoint.Ports,因为它们是副本列表,然后我需要以编程方式选择要连接的对象 - Reader Endpoint 将为我完成所有这些(这就是全部重点)。
【问题讨论】:
-
Replication 组中有一个
primaryNodeGroupMembers,它是第一个节点的入口点——并且是可读写的。但我认为公开集群端点而不是节点端点更安全,因为它可能更不稳定并且在发生故障时被替换。
标签: amazon-web-services redis amazon-cloudformation