Amazon EC2 Auto Scaling: co giãn, chịu lỗi AZ và scale inAmazon EC2 Auto Scaling: scaling, AZ fault tolerance and scale in
Lượng truy cập của MFTECH biến động theo giờ, theo đợt khuyến mãi và theo độ dài hàng đợi đơn hàng. Bài học trình bày cơ chế tự động điều chỉnh số lượng instance: cấu hình nhóm (launch template, subnet, min/desired/max, On-Demand kết hợp Spot), lựa chọn scaling policy phù hợp với từng dạng tải, duy trì đủ capacity khi mất một AZ, thứ tự lựa chọn instance bị terminate khi scale in, bảo trì instance mà không bị Auto Scaling thay thế, và các điều kiện để ASG thay thế một instance lỗi.MFTECH's traffic varies by the hour, by sale event and by the length of the order queue. This lesson covers how the number of instances is adjusted automatically: configuring the group (launch template, subnets, min/desired/max, On-Demand combined with Spot), choosing a scaling policy that fits each load pattern, keeping enough capacity when an AZ is lost, the order in which instances are terminated on scale in, maintaining instances without Auto Scaling replacing them, and the conditions under which the ASG replaces a failed instance.
- Mức độ
- Quan trọng Được sử dụng phổ biến trong nhiều mẫu kiến trúc
- Thời lượng
- ~40 phút, 7 phần học có mô phỏng
Ban đêm MFTECH chỉ cần 2 instance; tối thứ Sáu có chương trình khuyến mãi thì cần 12. Duy trì 12 instance cả ngày gây lãng phí chi phí, trong khi chỉ duy trì 2 instance làm tăng độ trễ cho người dùng. Auto Scaling group (ASG) tự động điều chỉnh số EC2 instance theo tải. Người thiết kế cần cấu hình: thời điểm scale out, capacity tối thiểu, và instance nào bị loại khi scale in.
At night MFTECH needs only 2 instances; on Friday evening, during a sale, it needs 12. Running 12 instances all day wastes money, while running only 2 increases latency for users. An Auto Scaling group (ASG) automatically adjusts the number of EC2 instances to the load. The designer needs to configure when to scale out, the minimum capacity, and which instance is removed on scale in.
Các phần của bài học
Kiến thức
7 phần học, đọc theo thứ tự- Phần 1/7Part 1/7 · 11 phút Đã đọc ✓ Đang đọc Cấu hình Auto Scaling groupAuto Scaling group configuration launch template, subnet và capacitylaunch template, subnets and capacity
- Phần 2/7Part 2/7 · 4 phút Đã đọc ✓ Đang đọc Scaling policy cho từng dạng tảiScaling policies for each load pattern
- Phần 3/7Part 3/7 · 5 phút Đã đọc ✓ Đang đọc Dynamic scaling simple, step và target tracking scaling policysimple, step and target tracking scaling policies
- Phần 4/7Part 4/7 · 3 phút Đã đọc ✓ Đang đọc Phân bổ capacity trên nhiều Availability ZoneDistributing capacity across Availability Zones
- Phần 5/7Part 5/7 · 7 phút Đã đọc ✓ Đang đọc Termination policy khi scale inTermination policies for scale in
- Phần 6/7Part 6/7 · 4 phút Đã đọc ✓ Đang đọc Bảo trì instanceInstance maintenance Standby, suspend process và health check grace periodStandby, suspended processes and health check grace period
- Phần 7/7Part 7/7 · 5 phút Đã đọc ✓ Đang đọc Health check và thay thế instance unhealthyHealth checks and replacement of unhealthy instances
Bài kiểm tra
tự đánh giá trước khi sang bài sauCác bài tiếp theo trong lộ trình học
Bài học tiếp theo
Tài liệu AWS
Xem thêm 25 tài liệu
- Configure termination policies
- Temporarily remove instances (Standby)
- Suspend and resume Amazon EC2 Auto Scaling processes
- Health check grace period
- Health checks overview
- Cluster Autoscaler (EKS best practices)
- Auto Scaling launch templates
- Set scaling limits for your Auto Scaling group
- Scheduled scaling
- Setup overview for creating a mixed instances group
- Auto Scaling groups with multiple instance types and purchase options
- Amazon EC2 Auto Scaling FAQs
- Step and simple scaling policies
- Simple scaling policies
- Scaling cooldowns
- Set the default instance warmup
- Use instance scale-in protection
- Set up a custom health check
- View the reason for health check failures
- Instance maintenance policies
- Rebalancing activities (Amazon EC2 Auto Scaling benefits)
- Launch configurations
- Elastic IP addresses
- Amazon EC2 Auto Scaling lifecycle hooks
- Create a Network Load Balancer
Xem thêm 25 tài liệu
- Configure termination policies
- Temporarily remove instances (Standby)
- Suspend and resume Amazon EC2 Auto Scaling processes
- Health check grace period
- Health checks overview
- Cluster Autoscaler (EKS best practices)
- Auto Scaling launch templates
- Set scaling limits for your Auto Scaling group
- Scheduled scaling
- Setup overview for creating a mixed instances group
- Auto Scaling groups with multiple instance types and purchase options
- Amazon EC2 Auto Scaling FAQs
- Step and simple scaling policies
- Simple scaling policies
- Scaling cooldowns
- Set the default instance warmup
- Use instance scale-in protection
- Set up a custom health check
- View the reason for health check failures
- Instance maintenance policies
- Rebalancing activities (Amazon EC2 Auto Scaling benefits)
- Launch configurations
- Elastic IP addresses
- Amazon EC2 Auto Scaling lifecycle hooks
- Create a Network Load Balancer