gpt4 book ai didi

amazon-web-services - AWS Elasticache Redis,当我的 Redis(已禁用集群模式)只有 1 个节点并且失败时会发生什么

转载 作者:行者123 更新时间:2023-12-03 06:40:10 29 4
gpt4 key购买 nike

我已阅读有关 AWS Elasticache Redis 的自动故障转移功能的信息。文档告诉我,故障转移过程需要我至少有 1 个副本节点(即至少 2 个节点),以便它可以使用副本节点来替换发生故障的主节点。

但是我无法找到有关如果我只有 1 个节点并且失败时会发生什么情况的详细信息。它是自动重新创建还是需要手动过程来删除并重新创建它?

我打算使用以下 CloudFormation 模板在我的测试环境中创建一个仅包含 1 个节点的 Redis 组(已禁用集群模式)。

    "ReplicationGroup": {
"Type": "AWS::ElastiCache::ReplicationGroup",
"Properties": {
"ReplicationGroupId" : "my-redis",
"ReplicationGroupDescription" : "My Redis",
"NumCacheClusters": 1,
"AutomaticFailoverEnabled": false,
"CacheNodeType": "cache.t3.medium",
"CacheParameterGroupName" : "default.redis5.0",
"Engine": "redis",
"EngineVersion" : "5.0.6",
"Port": "6379",
"AtRestEncryptionEnabled" : true,
"TransitEncryptionEnabled" : true,
"AuthToken" : {"Ref": "AuthToken"},
"CacheSubnetGroupName": {"Ref": "SubnetGroup"},
"SecurityGroupIds": [
{"Ref": "RedisSecurityGroup"}
],
"SnapshotRetentionLimit": 0,
"MultiAZEnabled" : {"Fn::If": ["ConditionMultiAZEnabled", true, false]}
}
},

最佳答案

我们之前遇到过这个问题。当 AWS 尝试安装重要的安全更新时,我们丢失了所有数据(服务更新 SLA 不满足)。这是一个单节点 Elasticache 实例。以下是包含 AWS Support 的所有详细信息的回复;

As you said, I found there were event messages on the cluster and BytesUsedForCache was dropped to 0. When I investigated the redis node, I was able to see that health check from ElastiCache service was failed since hardware failure and the node ***** was replaced to healthy new node to recover the redis service. Due to the redis cluster ***** has only single node *****, data loss can happen whenever the node is failed like this case.

To improve high availability to the redis cluster and keep your data in node failure case, you should make a replication group by adding at least a replica node to the cluster. Please read this link to understand replication group in detail. https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.html

Replica node can be used for only read request, but data is always replicated from primary node to replica node. Also replica node can be promoted to new primary when primary is failed, and then you can protect your data. This link provides how to add replica node . https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.AddReadReplica.html

Furthermore, you can also enable Multi-az with auto failover feature with replication group. It can failover primary node automatically when the primary node is failed. It can also jazz up High Aavailability of your redis cluster. https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html

关于amazon-web-services - AWS Elasticache Redis,当我的 Redis(已禁用集群模式)只有 1 个节点并且失败时会发生什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63048162/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com