amazon-ec2 - AWS弹性负载均衡器和多个可用区

标签 amazon-ec2 amazon-web-services load-balancing

我想了解 ELB 如何在多个可用区之间实现负载平衡。例如,如果我在区域 us-east-1a 中有 4 个实例 (a1, a2, a3, a4) 和一个实例 d1在 ELB 后面的 us-east-1d 中,两个可用区之间的流量如何分配?即,d1 会获得近 50% 的流量还是 1/5 的流量?

最佳答案

如果启用 ELB Cross-Zone Load Balancing ,d1将获得20%的流量。

以下是在不启用跨区域负载平衡的情况下发生的情况: D1将获得近50%的流量。这就是为什么 Amazon 建议将每个可用区中相同数量的实例添加到您的 ELB。

以下摘录自Overview of Elastic Load Balancing :

Incoming traffic is load balanced equally across all Availability Zones enabled for your load balancer, so it is important to have approximately equivalent numbers of instances in each zone. For example, if you have ten instances in Availability Zone us-east-1a and two instances in us-east-1b, the traffic will still be equally distributed between the two Availability Zones. As a result, the two instances in us-east-1b will have to serve the same amount of traffic as the ten instances in us-east-1a. As a best practice, we recommend you keep an equivalent or nearly equivalent number of instances in each of your Availability Zones. So in the example, rather than having ten instances in us-east-1a and two in us-east-1b, you could distribute your instances so that you have six instances in each Availability Zone.

关于amazon-ec2 - AWS弹性负载均衡器和多个可用区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11424481/

相关文章:

amazon-web-services - AWS,无法更改ec2实例类型

python - 如何卸载awslogs-agent-setup.py?

sql-server - Windows Azure VM 之间的数据库镜像

amazon-ec2 - 无法使用弹性 IP SSH 进入私有(private)子网

linux - Amazon EC2 Linux 实例(SSH、PuTTY 等)的默认用户名是什么?

javascript - 公开 AWS Cognito ID 是否安全?

Docker swarm 仅将请求转发到单个节点

load-balancing - 具有负载平衡的 session cookie(非粘性 session )

ruby-on-rails - craigslist 上的 HTTP GET 被阻止

java - SQL IN 与 java 中的 DynamoDb 等效