【问题标题】:What is the difference between AWS ElastiCache Cluster and AWS ElastiCache Replication Group?AWS ElastiCache 集群和 AWS ElastiCache 复制组有什么区别?
【发布时间】:2020-02-09 21:46:32
【问题描述】:

在 terraform/cloudformation 文档中,有两种不同的资源可用于创建 ElastiCache Redis 实例:

  1. aws_elasticache_cluster (https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html)
  2. aws_elasticache_replication_group (https://www.terraform.io/docs/providers/aws/r/elasticache_replication_group.html)

这两者有什么区别?我应该选择哪一个?

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation terraform amazon-elasticache


    【解决方案1】:

    简单来说,复制组是给 Redis 集群的,缓存集群是给 Memcache 的。您不能将命令应用于其他命令,即 Redis 集群的缓存集群,反之亦然。

    redis 也可以使用aws_elasticache_cluster,但前提是redis 有节点1,那不是集群模式。

    num_cache_nodes – (除非提供了 replication_group_id,否则是必需的)缓存集群将拥有的初始缓存节点数。对于 Redis,此值必须为 1。对于 Memcache,此值必须介于 1 到 20 之间。如果在后续运行中减少此数字,则将删除编号最高的节点。

    【讨论】:

    • 为什么可以在engine 参数上为aws_elasticache_cluster 指定redisterraform.io/docs/providers/aws/r/…
    • 当redis不是节点1的集群模式时,可以使用cluster命令,非常特别。
    • 将选择aws_elasticache_replication_group 导致集群redis 具有一个分片,choosing aws_elasticache_cluster 将导致标准redis 默认具有一个分片。如果这是正确的,任何人都可以帮忙吗?
    【解决方案2】:

    复制组是缓存集群的集合,其中一个集群是主读写集群,其他集群是只读副本。

    AWS::ElastiCache::CacheCluster

    AWS::ElastiCache::ReplicationGroup

    【讨论】:

    • 我已经阅读了文档,但说实话我并没有完全理解其中的区别,我应该选择哪一个?
    猜你喜欢
    • 2021-02-05
    • 2018-05-06
    • 1970-01-01
    • 2018-05-03
    • 2019-09-12
    • 2022-10-20
    • 2018-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多