Lesson 2 of 3 Architecture Patterns

Designing for High Availability and Fault Tolerance

This lesson explains the principles of resilient design, the second-largest exam domain: remove single points of failure, spread across failure domains, decouple components and automate recovery.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish high availability, fault tolerance and disaster recovery.
  • Identify single points of failure and their resilient alternatives.
  • Choose a level of resilience for a requirement.

High availability and fault tolerance

Three related terms describe how a system copes with failure, and exam questions use them precisely. High availability means the system keeps working with only a brief interruption when a component fails. For example, RDS Multi-AZ fails over to its standby in a minute or two, during which connections drop.

Fault tolerance means the system keeps working with no interruption at all, because enough redundant capacity is already running. For example, if an application needs six instances, running three in each of three Availability Zones, nine in total, lets it lose a zone without any reduction in capacity; fault tolerance costs more than high availability. Disaster recovery is restoring service after a large-scale event, such as the loss of a Region, using strategies that range from backup and restore to multi-site active/active. The following table summarises the three terms.

TermMeaningExample
High availabilityThe system keeps working with little interruption when a component failsRDS Multi-AZ fails over in a minute or two
Fault toleranceThe system keeps working with no interruption at allEnough instances in three AZs to lose one AZ without any capacity drop
Disaster recoveryRestoring service after a large-scale event such as a Region failureBackup and restore, pilot light, warm standby, active/active

Removing single points of failure

A single point of failure is any component whose failure stops the whole system, and resilient designs replace each one with a redundant alternative. A single EC2 instance becomes an Auto Scaling group across several Availability Zones behind a load balancer. A single database instance becomes RDS Multi-AZ, an Aurora cluster with replicas, or DynamoDB, which is replicated across zones by design. A single zonal NAT gateway lives in one zone, so each Availability Zone gets its own, or a Regional NAT gateway spans the zones.

Failures also spread through dependencies. Synchronous calls between services mean one slow service stalls the others, so an SQS queue between them lets each continue independently. Data held in one Region is lost with that Region unless it is replicated or backed up elsewhere. A single VPN or Direct Connect link to on premises is replaced by redundant connections, often with a VPN as the backup for Direct Connect. The following table summarises these examples.

Single point of failureResilient alternative
One EC2 instanceAuto Scaling group across several AZs behind a load balancer
One database instanceRDS Multi-AZ, Aurora replicas, or DynamoDB
One zonal NAT gatewayOne NAT gateway per AZ, or a Regional NAT gateway
Synchronous calls between servicesSQS queues so one slow part does not stop the others
Data in one RegionCross-Region replication or backups
One VPN or Direct Connect linkRedundant connections, with VPN as a backup
Match the pairs

Removing single points of failure

Exam skills 2.2.4

Match each single point of failure with its resilient alternative.

Log in to try this activity Interactive activities are free with an account.

Levels of resilience

Architectures provide increasing levels of resilience at increasing cost and complexity. A single Availability Zone design has the lowest cost, but an outage of that zone stops the application. A Multi-AZ design survives the loss of a zone and is the standard for production workloads.

A multi-Region disaster recovery design survives the loss of a whole Region, with recovery time and data loss set by the chosen DR strategy. A multi-Region active/active design serves users from several Regions at once, giving near-zero downtime at the highest cost and complexity. The right choice is the lowest level that meets the business requirement, because each step up adds cost.

The following diagram orders the four levels by cost and resilience.

Levels of resilience in increasing cost and complexity. A single Availability Zone design stops if that zone fails. A Multi-AZ design survives the loss of a zone and is the standard for production. A multi-Region disaster recovery design survives the loss of a Region, and multi-Region active/active gives near-zero downtime at the highest cost.
Each step to the right protects against a larger failure and costs more to build and run.
Put in order

Levels of resilience

Exam skills 2.2.2 · 4.2.4

Order the levels of resilience from cheapest to most resilient.

Log in to try this activity Interactive activities are free with an account.
Worked example

From fragile to fault tolerant

A booking application runs on one EC2 instance with a database on the same instance in one AZ. The business asks for it to survive an AZ failure and absorb booking spikes.

ChangePrinciple
Database moved to Aurora with a replica in a second AZRemove the single point of failure
Web tier in an Auto Scaling group across three AZs behind an ALBSpread across failure domains
Booking requests placed in SQS and processed by workersDecouple and absorb spikes
Health checks replace failed instances; Aurora fails over automaticallyAutomate recovery
Daily backups copied to a second Region with AWS BackupPrepare for disaster recovery

Each change addresses one principle, and together they meet the requirement without going to the cost of a multi-Region active/active design that the business did not ask for.

Check yourself

What is the difference between high availability and fault tolerance?

Show answer

A highly available system recovers quickly from failure, perhaps with a short interruption. A fault-tolerant system keeps working with no interruption, usually by running redundant capacity.

Exam Tips

Remember for the exam

  • High availability tolerates brief interruption; fault tolerance tolerates none.
  • Remove single points of failure: one instance, one database, one NAT gateway, one connection.
  • Spread resources across multiple AZs for production workloads.
  • Decouple with SQS so failures and spikes in one part do not stop the rest.
  • Choose the lowest level of resilience that meets the requirement.