Cross-zone load balancing
Load balancer có node tại nhiều AZ; cách phân phối traffic giữa các AZ quyết định mỗi target nhận nhiều hay ít request.
Trong đợt khuyến mãi, MFTECH bổ sung gấp EC2 instance tại AZ B, trong khi AZ A vẫn chỉ có 1 instance. Câu hỏi: target duy nhất tại AZ A có bị quá tải hay không? Điều chỉnh thanh trượt và bật/tắt cross-zone load balancing. Thử với 1 target tại AZ A và 4 target tại AZ B; sau đó với 4 và 6.
Cấu hình mặc định: ALB luôn bật cross-zone ở cấp load balancer (có thể tắt ở cấp target group); NLB và GWLB tắt cross-zone.
- DNS phân phối đều cho các node của load balancer tại từng AZ.
- Khi bật cross-zone: tải được phân phối đều cho mọi target.
- Khi tắt cross-zone: mỗi AZ nhận một phần bằng nhau, sau đó phân phối cho các target trong AZ đó, do vậy target thuộc AZ có ít target hơn sẽ nhận tải lớn hơn.
- Mặc định: ALB luôn bật cross-zone ở cấp load balancer (tắt được ở cấp target group); NLB và GWLB tắt.
Cross-zone load balancing
A load balancer has nodes in several AZs; how traffic is distributed between those AZs decides whether each target receives many requests or few.
During a sale, MFTECH urgently adds EC2 instances in AZ B, while AZ A still has only 1 instance. The question: is the single target in AZ A overloaded? Adjust the sliders and turn cross-zone load balancing on or off. Try 1 target in AZ A and 4 targets in AZ B; then 4 and 6.
Cấu hình mặc định: ALB luôn bật cross-zone ở cấp load balancer (có thể tắt ở cấp target group); NLB và GWLB tắt cross-zone.
- DNS splits traffic evenly between the load balancer nodes in each AZ.
- With cross-zone on: load is spread evenly across all targets.
- With cross-zone off: each AZ gets an equal share, which is then spread across the targets in that AZ, so targets in an AZ with fewer targets receive more load.
- Defaults: ALB always has cross-zone on at the load balancer level (it can be turned off at the target group level); NLB and GWLB have it off.