gpt4 book ai didi

amazon-web-services - Elasticache 和可用区

转载 作者:行者123 更新时间:2023-12-04 08:13:45 27 4
gpt4 key购买 nike

我在新加坡的 2 个可用区使用 AWS 负载平衡和多个 Web 服务器。

我现在正在寻找跨两个可用区部署 elasticache 节点,并想知道是否存在由 Web 服务器访问不同可用区的 elasticache 节点引起的延迟问题?

更新 - 实际上,经过更多调查,似乎一个 elasticache 集群只能存在于一个可用区中。因此,处理可用区中断的最佳解决方案是什么?

最佳答案

您说得对,ElasticCache 尚不支持多可用区功能。但是 AZ 之间 1ms 的低延迟通常不是什么大问题。

缓存的目的是从内存中进行长时间且频繁的 SQL 查询。这不是 300 毫秒的 SQL 查询,您可以通过单个内存查找来提供它。与 1ms 相比,网络延迟应该不是问题。

作为 ElasticCache 的缓存的第二个属性是您正在对其进行预热并使用数据库中的实时数据对其进行保温。你永远不应该期望你的缓存作为一个整体是最新的,因为后台的数据一直在变化。预计会丢失集群中的缓存节点(与大型系统中的任何其他故障一样),因为您的系统应该相当快地预热新创建的缓存节点。 ElasticCache 将为您替换故障节点,但您需要用缓存数据再次填充它。

关于可用区之间的冗余,您可以查看 AWS description :

Setting up redundant Cache Clusters in different Availability Zones

Amazon ElastiCache monitors the health of your Cache Nodes and replaces them in the event of network partitioning, host hardware or software failure. However, given the ephemeral nature of a cache, Cache Node replacements begin empty (also called “cold”), and depending on your workload pattern, may take some time to be re-populated with data (also called “warming up”). Additionally, the auto-replacement functionality provided by Amazon ElastiCache is restricted to a single Availability Zone. If your application is sensitive to the failure recovery or the “warm up” time of Cache Nodes, or you want enhanced fault-tolerance for Availability Zone level failures, you may wish to deploy redundant ElastiCache Clusters in different Availability Zones.

One of the ways to manage data redundancy is to have your application apply all cache writes to Cache Nodes across these Availability Zones. If one or more of your Cache Nodes in the primary Availability Zone fails, you could direct reads to the corresponding Cache Node(s) in the secondary Availability Zone while Amazon ElastiCache restores the Cache Node(s) in the primary Availability Zone.

关于amazon-web-services - Elasticache 和可用区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14422379/

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