大网数据广告活动
服务器运维问答

Why should I ever limit a load balancer to a specific availability zone (AWS)?

· 52CE 我爱测

I'm starting to learn how to manage a cloud infrastructure and I'm going through the AWS documentation right now. If my question didn't make it obvious enough, I'm a complete beginner about this stuff. When creating a ELB (Elasti…

问题原文

原帖链接 · MyUsername112358 · CC BY-SA 4.0

I'm starting to learn how to manage a cloud infrastructure and I'm going through the AWS documentation right now. If my question didn't make it obvious enough, I'm a complete beginner about this stuff. When creating a ELB (Elastic Load balancer), I get the option of selecting which availability zones I want my load balancers to serve.

My question is: Why would I not always select all of them? Seems like the worst case scenario is that the load balancers serve zones with no instances, which as far as I know is not a problem. Also, since I'll be using Spot Fleet with multiple zones to launch my instances, I won't know in which zones the instances are going to be launched, so I might as well select them all.

Am I wrong? Thank you.

已采纳解答

原帖链接 · MLu · CC BY-SA 4.0

Having ELB in a different AZ than the instance has two downsides:

  1. Slightly higher latency
  2. Cross-AZ traffic (which costs $0.02/GB)

ELB/ALB gives you the option to Enable / Disable Cross-AZ access. For small deployments you should keep it enabled so that the ELB can talk to any available host in any AZ (especially if you've got only one) to improve the availability.

On the other hand when you've got a large enough fleet of worker nodes across multiple AZs you should disable cross-az access in ELB to save on cross-az data transfer costs and to improve the latency.

With the above in mind you can now decide whether to create your ELB in all AZs or not.

Hope that explains it :)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。