liveBook · Manning

Resilience

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A fault-tolerant service continues providing its intended functionality despite failures in components or infrastructure.

Resilience is the ability to handle a failure with no or little effect on users. Disks, networks, and power can fail, so a resilient service must be designed to deal with failures rather than assume they will not happen. section 16.0

High availability and fault tolerance set different expectations. A highly available service can recover automatically after a short interruption. A fault-tolerant service continues serving users without interruption when a component fails. section 13.0

For an application running on EC2 virtual machines, address failure at several layers:

  • Remove single points of failure: run multiple instances in different Availability Zones. An Auto Scaling group replaces failed instances. section 16.1.2
  • Decouple work: use a load balancer to send requests to healthy instances, or an SQS queue to separate message producers from workers. section 16.1.2
  • Keep state off individual EC2 instances, retry after failures, and make operations idempotent where possible so retries do not depend on an instance surviving. section 16.2 section 16.4

When one web server fails

A load balancer stops sending requests to the failed EC2 instance. Other instances continue serving requests while an Auto Scaling group replaces it. Placing instances in two Availability Zones also leaves capacity if one zone has an outage. section 16.1.2

Figure 16.3 Fault-tolerant EC2 instances with an Auto Scaling group and an Elastic Load Balancer

The diagram shows how a load balancer and Auto Scaling group work together around redundant EC2 instances. section 16.1.2

Check each AWS service’s resilience documentation and service-level agreement before relying on it: services offer different failure guarantees. EC2 is not fault tolerant by default, though some managed services are. Redundancy is more affordable under pay-per-use pricing, but it still requires deliberate architecture. section 13.3.2 section 1.4.3

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains architectural redundancy and code practices, but the supplied evidence does not specify deployment commands.
Examples
Uses failed EC2 instances, Availability Zone outages, and load-balanced or queue-based workloads to show how service can continue.
What it assumes
Defines high availability and fault tolerance before applying them to AWS infrastructure.
What you can do after
Build it from scratch using redundant stateless EC2 instances across Availability Zones, decoupled work, retries, and idempotent operations.
How it connects
Connects fault tolerance to high availability, Availability Zones, Auto Scaling, load balancing, SQS, retries, and idempotence.

Also explained in

Compare how 13 books explain resilience →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.