ladderlore
  • 输入服务名称,例如 S3 或 IAM。

概念

High availability with multiple AZs

Run each part of an application in at least two Availability Zones, so losing one AZ does not stop it.

本课尚未翻译,暂以英文显示。

RegionAZ AAZ B
用户
Load BalancingEC2EC2RDS
Standby copy
  1. 1Users send requests to the load balancer.
  2. 2It passes each request to a healthy EC2 instance in either AZ.
  3. 3The instances read and write data in the database in AZ A.
  4. 4RDS copies every change to a standby in AZ B. If AZ A fails, the standby takes over.
A highly available web application spread across two Availability Zones.

分步说明

  1. 1Users send requests to the load balancer.
  2. 2It passes each request to a healthy EC2 instance in either AZ.
  3. 3The instances read and write data in the database in AZ A.
  4. 4RDS copies every change to a standby in AZ B. If AZ A fails, the standby takes over.

A highly available web application spread across two Availability Zones.

  • Built in

    What you do
    Nothing. The service already uses several AZs.
  • A setting you turn on

    What you do
    Choose Multi-AZ. The service keeps a copy in another AZ and fails over to it.
  • Your own design

    What you do
    Run copies in two or more AZs, with a load balancer and Auto Scaling.
    Examples
    EC2EBS
Who makes it multi-AZ: the service, a setting, or your own design.

1 / 2

  • Built in

    What you do
    Nothing. The service already uses several AZs.
  • A setting you turn on

    What you do
    Choose Multi-AZ. The service keeps a copy in another AZ and fails over to it.

2 / 2

  • Your own design

    What you do
    Run copies in two or more AZs, with a load balancer and Auto Scaling.
    Examples
    EC2EBS
Who makes it multi-AZ: the service, a setting, or your own design.

是什么

Anything that runs in only one place is a single point of failure. To keep an application available, AWS recommends running every production workload in at least two Availability Zones. Because AZs share no power, cooling or network, one AZ can fail while the others keep serving users.

是什么

A common pattern: Elastic Load Balancing spreads requests across Amazon EC2 instances in several AZs, and sends traffic only to healthy ones. Amazon EC2 Auto Scaling keeps instances running in each AZ and launches replacements in a healthy AZ. For the database, Amazon RDS Multi-AZ keeps a standby copy in another AZ and switches to it automatically if the main one fails.

Some services do this for you. Amazon S3, Amazon DynamoDB and AWS Lambda already spread across AZs. With Amazon RDS, you turn on the Multi-AZ setting. With Amazon EC2 and Amazon EBS, you place copies in several AZs yourself.

要记住

  • Use at least two AZs for anything that must stay up.
  • Load balancer + EC2 instances in several AZs + Auto Scaling = a highly available web tier.
  • RDS Multi-AZ: a standby in another AZ, kept in sync, with automatic failover. A single standby does not serve reads.
  • S3 One Zone-IA and S3 Express One Zone keep data in one AZ only, so they do not survive the loss of that AZ.

要记住

  • Several AZs protect against a data center or AZ failure. To survive the loss of a whole Region, use more than one Region.

考试中

  • “Make an application highly available” or “survive the failure of a data center” points to deploying across multiple Availability Zones.
  • “Fail over automatically to a standby database in another AZ” is Amazon RDS Multi-AZ. Read replicas are for spreading read traffic.