【问题标题】:Does CloudFormation expose the Reader Endpoint of a Redis ElastiCache Replication Group?CloudFormation 是否公开 Redis ElastiCache 复制组的 Reader Endpoint?
【发布时间】: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


【解决方案1】:

docs 仍然说不支持,但我刚刚试了一下,它成功了:

!GetAtt MyReplicationGroup.ReaderEndPoint.Address
!GetAtt MyReplicationGroup.ReaderEndPoint.Port

【讨论】:

【解决方案2】:

Reader Endpoint Address 当前未公开。

但是 Primary EndpointReader 之间存在关系 您可以使用的端点

假设您有一个主要端点 one.two.three.com
那么阅读器端点将是 one-ro.two.three.com

这样,您可以在对应的 Primary Endpoint 的帮助下生成 Reader Endpoint 的地址。

注意:我知道这不是永久的解决方案,但现在作为 解决方法我们可以在 Primary 的帮助下推断 Reader Endpoint 端点。

【讨论】:

  • 是的,我认为在等待读取器端点暴露时(根据 CloudFormation 路线图上的请求),我们将求助于使用它,尽管存在这种格式可能会在没有注意并打破我们的自动化。
【解决方案3】:

您可能不得不求助于在 Cloudformation coverage roadmap 上提出问题,以使 Reader Endpoint 属性可用于 Cloudformation。

【讨论】:

猜你喜欢
  • 2015-12-08
  • 2014-08-13
  • 1970-01-01
  • 2021-11-10
  • 1970-01-01
  • 1970-01-01
  • 2015-02-11
  • 2015-04-05
  • 1970-01-01
相关资源
最近更新 更多