Cloud concept · Updated

Fault Tolerance - Fault tolerance is the ability of a system to continue performing its intended function when one or more components fail.

In short

Fault-tolerant systems use redundancy, failure isolation, and automated handling of faults to keep component failures from becoming service failures. In the cloud, this capability also determines which workloads can safely use interruptible compute capacity and which need a more predictable capacity strategy.

Cloud Concepts Hub →

6 key aspects of Fault Tolerance

Fault tolerance combines failure-aware architecture, redundant capacity, restartable work, and tested automation, while keeping compute pricing decisions separate from continuity guarantees.

01
Explicit failure scope

Define whether the system must tolerate instance, dependency, availability-zone, or regional failures. A design that survives one instance failure does not automatically survive a zone outage.

02
Redundancy and failure isolation

Distribute sufficient capacity across independent failure domains and remove shared single points of failure. Ensure surviving components can support the required workload.

03
Interruption-tolerant execution

Make work restartable through durable checkpoints, queues, and idempotent processing. These capabilities make interruptible compute options such as Spot practical without treating instance lifetime as guaranteed.

04
Purchasing model alignment

Choose Spot for work that can withstand interruption and On-Demand for flexible usage that should avoid Spot reclamation. Use Reserved Instances or Savings Plans for eligible predictable usage, recognizing that pricing commitments do not provide application fault tolerance.

05
Automated fault handling

Use health checks, traffic rerouting, bounded retries, and instance replacement to handle failures without waiting for manual intervention. Keep enough healthy capacity available while replacements start.

06
Validation and cost control

Test component loss and capacity shortages under realistic load. Balance redundancy and operational complexity against the business impact of interrupted service.

Cloud services for Fault Tolerance

EC2 supplies application and worker capacity, while EC2 Auto Scaling maintains the fleet across availability zones and replaces failed instances. Elastic Load Balancing routes incoming requests to healthy targets. SQS preserves queued work independently of worker lifetime, making restartable workers a practical fit for Spot Instances. RDS Multi-AZ adds database redundancy, although applications must handle connection interruptions during failover. Together, these services support fault-tolerant designs only when capacity, state management, retries, and dependencies are configured appropriately. Purchasing discounts reduce compute costs; they do not replace redundancy or failure testing.

Amazon EC2Amazon EC2

EC2 provides the compute instances and purchasing options around which interruption handling must be designed. Spot suits restartable work, while On-Demand, Reserved Instances, and Savings Plans address different usage and pricing needs without eliminating infrastructure failures.

Amazon EC2 Auto ScalingAmazon EC2 Auto Scaling

Auto Scaling can maintain desired instance capacity, replace unhealthy instances, and distribute a group across availability zones. Mixed instances groups can combine On-Demand and Spot capacity, but replacement still depends on available capacity and instance startup time.

Amazon RDSAmazon RDS

RDS Multi-AZ deployments provide database redundancy and automated failover for supported failure scenarios. Failover can interrupt connections, so applications still need reconnection and safe retry logic; Multi-AZ does not mean every database request proceeds without interruption.

Fault Tolerance exam questions

Real practice exam questions on Fault Tolerance, with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

A media company uses Amazon EC2 instances to render a backlog of video files. Each rendering task saves its progress to durable storage and can resume on another instance if interrupted. The completion time is flexible, and the company does not want a long-term spending commitment. Which purchasing option is the MOST cost-effective fit for this workload?

Show answerCORRECT ANSWER

EC2 Spot Instances

Spot Instances offer discounted access to spare EC2 capacity without a long-term commitment. Because the rendering tasks save progress and have flexible completion times, they can tolerate Spot interruptions.

SOA-C03

A company runs application instances in private subnets in Availability Zones A and B. The applications must call the regional AWS Security Token Service (AWS STS) API to obtain credentials. The VPC has no NAT gateway or other internet access path. An AWS STS interface VPC endpoint has private DNS enabled and an endpoint network interface only in Zone A.

During a Zone A outage, applications in Zone B remained healthy but could not refresh their credentials. The endpoint security group and network ACLs already permit the required traffic from both application subnets. The applications use the standard regional AWS STS hostname and retry failed requests with fresh DNS lookups.

Which change should a CloudOps engineer make so that applications in a surviving zone can continue obtaining credentials after either zone becomes unavailable?

Show answerCORRECT ANSWER

Modify the existing AWS STS interface endpoint to include a subnet in Zone B while retaining its subnet in Zone A and private DNS configuration.

Adding a subnet in Zone B creates an endpoint network interface there. The endpoint then provides private connectivity through network interfaces in both zones. With private DNS and application DNS refresh and retries, applications can use a surviving endpoint interface without depending exclusively on Zone A.

SAP-C03

A media company uses an Amazon SQS Standard queue to distribute video-processing jobs to EC2 Spot Instances in an Auto Scaling group across three Availability Zones. Each job takes between 5 and 40 minutes. Input files are stored durably, and interrupted jobs can restart from the beginning. Replacement workers are available, but workers can fail without receiving an interruption notice.

The company requires unfinished jobs to become eligible for another worker within 2 minutes after a worker fails. Jobs must not become eligible for reassignment simply because healthy processing takes longer than the initial visibility timeout. If a worker fails after publishing a result but before acknowledging the message, a retry must not publish another result for the same job. The durable result repository supports atomic conditional writes keyed by a unique job ID.

Which solution meets these requirements?

Show answerCORRECT ANSWER

Set the queue visibility timeout to 90 seconds. While a job is actively processing, have its worker call ChangeMessageVisibility every 30 seconds to reset the timeout to 90 seconds. Atomically publish the result only if the job ID has no existing result, and delete the message after confirming that the result is durably stored.

Periodic visibility extensions keep a healthy long-running job from being reassigned because its timeout expires. If the worker fails, extensions stop and the message becomes eligible for another worker within 90 seconds of the last extension. Conditional publication prevents duplicate results, including when a worker fails after committing a result but before deleting the message. A retry can recognize the existing result and safely delete the message.

Practice Fault Tolerance in a full exam

Questions on Fault Tolerance in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Fault Tolerance

3 min read

Fault tolerance means designing a system to continue operating despite specified component failures. The failure might affect a process, virtual machine, network connection, or an entire availability zone. The design must state which failures it can tolerate and what behavior remains acceptable. Running two servers does not establish fault tolerance if both depend on a single database, share the same failure domain, or lack enough remaining capacity when one fails.

Cloud architectures commonly implement fault tolerance by distributing redundant components across independent failure domains, routing requests only to healthy instances, and keeping important state outside replaceable compute instances. For example, a web application can run across multiple availability zones behind a load balancer. If an instance fails, healthy instances continue serving requests while automation replaces it. The surviving capacity must be sufficient for the expected load; replacement alone may be too slow to prevent an outage.

Compute purchasing decisions are an important application of this concept. Amazon EC2 Spot Instances use spare capacity at discounted prices, but AWS can interrupt them when that capacity is needed elsewhere. They suit interruption-tolerant workloads such as batch processing, distributed data analysis, rendering, and queue-based workers. A worker can checkpoint progress to durable storage, process tasks idempotently, and allow unfinished tasks to be retried elsewhere. A Spot interruption notice typically provides approximately two minutes of warning before stopping or terminating an instance, but applications must not depend on receiving that warning; hibernation can begin immediately.

A practical batch-processing design stores input and checkpoints durably and uses a queue to distribute tasks across workers. If a worker disappears before acknowledging completion, its task becomes available for another worker after the visibility timeout. Duplicate processing remains possible, so task handlers must prevent repeated side effects. Diversifying Spot capacity across suitable instance types and availability zones reduces exposure to a shortage in one capacity pool, but it does not guarantee capacity or uninterrupted execution.

On-Demand Instances are appropriate for short-term, unpredictable, or interruption-sensitive workloads that do not justify a usage commitment. They avoid Spot-specific reclamation, but they can still experience infrastructure failures. Reserved Instances and Savings Plans reduce costs in exchange for commitments; neither makes application code fault tolerant. Savings Plans do not reserve capacity. Zonal Reserved Instances can include a capacity reservation in a specified availability zone, whereas Regional Reserved Instances do not. On-Demand Capacity Reservations address capacity availability in a particular availability zone, not application continuity. Dedicated Hosts primarily address physical-server placement, licensing, and isolation requirements rather than fault tolerance.

A customer-facing application can combine an On-Demand baseline with additional Spot capacity when losing the Spot portion will not violate its service objectives. Predictable eligible baseline usage may benefit from Reserved Instances or Savings Plans. Conversely, a non-checkpointable, single-node job with a strict deadline is usually a poor Spot candidate. In exam scenarios, interruption tolerance is the key purchasing clue: flexible, restartable work favors Spot, while unpredictable work requiring non-Spot execution commonly favors On-Demand.

Fault tolerance has costs: redundant capacity, replicated storage, cross-zone communication, and more complex operations. Retries require limits, backoff, and idempotency to avoid duplicate actions or cascading overload. High availability emphasizes uptime and may include brief recovery interruptions; fault tolerance emphasizes continued operation during the failures covered by the design. Backups and disaster recovery support recovery after disruption but do not, by themselves, provide uninterrupted service. Test failure scenarios under load rather than assuming that redundancy or a purchasing commitment guarantees continuity.

Learn Fault Tolerance in lessons

11 short lessons on Fault Tolerance in 6 certification courses.

and 5 more lessons

Open the lessons