amazon-web-services - 使用 Redis 作为 AWS 负载均衡器

标签 amazon-web-services redis amazon-elb

我们使用 Redis 从 AWS ELB 后面的 Web 应用程序(基于发布/订阅)收集事件。 我们正在寻找一种解决方案,使我们能够针对不同的服务器进行扩展和高可用性。我们不希望将这两台服务器放在 Redis 集群中,我们的计划是使用 cloudwatch 监控它们,并在必要时在它们之间切换。

我们尝试了一个简单的测试,将两个 Redis 服务器定位在 ELB 后面,telnet ELB DNS 并使用“redis-cli monitor”查看会发生什么,但我们什么也没看到。 (在没有 ELB 的情况下尝试相同的方法时,它似乎很好)

有什么建议吗?

谢谢

最佳答案

我在寻找类似问题时遇到了这个问题,但不同意接受的答案。尽管这已经很老了,但希望它能对将来的人有所帮助。

对于您在此处提出的问题,将 DNS 故障转移与 Redis 复制自动故障转移配置结合使用更为合适。 DNS 故障转移提供可用性组(如果您需要那种级别的规模),复制组提供缓存正常运行时间。

http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring.html

主动-被动故障转移应该提供您想要的高可用性解决方案:

Active-passive failover: Use this failover configuration when you want a primary group of resources to be available the majority of the time and you want a secondary group of resources to be on standby in case all of the primary resources become unavailable. When responding to queries, Amazon Route 53 includes only the healthy primary resources. If all of the primary resources are unhealthy, Amazon Route 53 begins to include only the healthy secondary resources in response to DNS queries.

设置 DNS 后,您可以将其指向 Elasticache Redis 故障转移组的 URL,并添加多个组以在故障转移操作期间获得更高的可用性。

但是,您可能需要将应用程序设置为从不同端点写入和​​读取,以最大限度地提高架构的可扩展性。

来源:

http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Replication.html http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoFailover.html

关于amazon-web-services - 使用 Redis 作为 AWS 负载均衡器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33125939/

相关文章:

java - 在 Redis 中存储带有时间戳的值列表

apache - AWS Elastic Load Balancer 对特定端点的 SSL 支持

将 http 重定向到 https AWS ELB 而无需在网络服务器上托管 ssl 证书

linux - 如何读取 AWS ElasticBeanstalk 中设置的环境属性

javascript - 无法在nodejs中下载AWS S3文件

node.js - 尝试使用 PUT 将 PDF 作为 Blob 上传到 S3 存储桶时禁止 403

ruby-on-rails - 视频仍在使用 redis 和 sidekiq 在 Rails 应用程序中编码消息

amazon-web-services - 列出缺少特定标签的卷

php - 如何查询laravel采集结果

node.js - 配置负载均衡器路由到实例的不同页面?