Cloud concept · Updated

Failover - Failover is the transfer of traffic or processing from a failed or unhealthy resource to a healthy alternative so a service can continue operating.

In short

Failover uses redundant resources, health detection, and a mechanism for transferring work to reduce interruptions when components fail. In cloud architectures, distributing those resources across multiple Availability Zones helps maintain availability when an instance or an entire zone becomes unavailable.

Cloud Concepts Hub →

6 key aspects of Failover

Effective failover combines independent redundant resources, reliable health detection, sufficient capacity, consistent data handling, and tested recovery procedures.

01
Failure detection and transfer

Health checks or monitoring identify when a resource cannot serve its workload, and routing or orchestration moves work to an alternative. Configure thresholds to avoid both slow recovery and unnecessary failovers.

02
Independent failure domains

Place redundant resources across multiple Availability Zones to reduce dependence on one zone's infrastructure. Verify that databases and other critical dependencies have equivalent protection.

03
Ready capacity

Surviving resources must have enough capacity to accept transferred work. Reserve headroom or maintain suitable standby capacity rather than relying entirely on resources that must be provisioned after failure.

04
State and data continuity

Replicate required data and avoid storing essential session state only on a single application instance. Understand replication lag, write ownership, and the possibility of data loss during promotion.

05
Application recovery behavior

Applications must reconnect after endpoint or connection changes and use bounded retries with backoff. Make retried writes idempotent where possible so recovery does not create duplicate transactions.

06
Testing and controlled failback

Exercise failover under realistic load and measure recovery time and data loss against objectives. Return traffic to recovered resources only after validating their health and data consistency.

Cloud services for Failover

Elastic Load Balancing directs application traffic to healthy targets distributed across Availability Zones, while Amazon EC2 Auto Scaling maintains and replenishes the underlying instance capacity. Amazon RDS Multi-AZ deployments provide database redundancy and managed failover, but applications still need connection recovery and safe retry logic. Amazon Route 53 can provide DNS-level failover between separate endpoints, including deployments in different Regions when the architecture supports it. Together, these services address different layers of availability; they still require compatible data replication, sufficient surviving capacity, and tested end-to-end recovery procedures.

Amazon RDSAmazon RDS

Amazon RDS supports managed database failover through Multi-AZ deployments. In a Multi-AZ DB instance deployment, RDS synchronously replicates to a standby in another Availability Zone and can automatically fail over to it; that standby does not serve read traffic.

Amazon EC2 Auto ScalingAmazon EC2 Auto Scaling

Amazon EC2 Auto Scaling maintains desired instance capacity and replaces unhealthy instances. An Auto Scaling group spanning multiple Availability Zones complements traffic failover by maintaining and replenishing compute capacity, although instance launch and application startup take time.

Amazon Route 53Amazon Route 53

Amazon Route 53 supports DNS failover routing that can return a secondary endpoint when the primary is considered unhealthy. Recovery is affected by health evaluation, DNS caching, and client behavior, so it does not immediately move every client or preserve existing connections.

Failover exam questions

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

AIB-C01 (beta)

A document-processing company is replacing manual document classification with an AI-based process. Contracts require classification to resume within two minutes if the active AI deployment stops working. The company has a secondary deployment in a separate failure location, with approved data access and tested capacity for the full workload. Application routing can switch between deployments automatically.

During a disruption exercise, the active deployment's infrastructure health checks remain successful even though its model cannot produce classifications. Traffic continues going to that deployment, and processing stops for 12 minutes until an operator intervenes.

What should the AI business strategist require before approving the transition?

Show answerCORRECT ANSWER

Require end-to-end classification health checks that trigger automatic routing to the healthy secondary deployment, and demonstrate recovery within two minutes in disruption tests.

The secondary deployment and routing mechanism are already available, but failure detection does not reflect useful business operation. Functional checks, automatic transfer, and timed disruption tests address the demonstrated gap and provide evidence that the continuity requirement can be met.

MLA-C02 (beta)

A company runs a stateless ML inference API on Amazon EC2 instances in an Auto Scaling group across two Availability Zones. An Application Load Balancer (ALB) distributes requests to the instances. Each Availability Zone has enough running capacity to handle the full production workload.

Occasionally, an instance's model-serving process becomes unresponsive, but its web proxy continues to return HTTP 200 for the ALB's static /health page. EC2 status checks also continue to pass. Requests routed to the affected instance time out. Loading the model onto a replacement instance takes 8 minutes.

The company needs to automatically redirect new requests away from affected instances to healthy, already-running instances and replace the affected instances. Which configuration meets these requirements?

Show answerCORRECT ANSWER

Configure the ALB to check an application health endpoint that succeeds only when the model-serving process can complete a lightweight inference within a timeout. Enable Elastic Load Balancing health checks for the Auto Scaling group.

The application-aware check detects instances that cannot perform inference. After the unhealthy threshold is reached, the ALB stops routing new requests to those instances and uses the healthy instances with sufficient capacity in the other zone. Enabling Elastic Load Balancing health checks allows the Auto Scaling group to replace instances that the load balancer reports as unhealthy.

SAP-C03

A company operates a document-processing API in two AWS Regions. Amazon Route 53 failover records direct clients to the active Region or a fully provisioned standby Region. Each record has an associated HTTPS health check with response-body string matching. The company is preparing a failover exercise to measure recovery time through the public API hostname.

During baseline testing, Route 53 reports the active endpoint as unhealthy even though document-processing requests succeed. The health check requests /diagnostics and searches for READY_TO_SERVE. Packet captures show the following behavior consistently across all health checker locations:

• The endpoint returns HTTP 200 within 100 milliseconds.
• The response body arrives 2.4 seconds after the HTTP status code.
• The search string starts at byte 5,115 and ends at byte 5,128 of the response body.

The endpoint includes READY_TO_SERVE only when the application and its required dependencies can process documents. It returns HTTP 200 even when that string is absent. The standby endpoint has the same implementation.

The company must eliminate these baseline health check failures without weakening application-readiness detection. The existing DNS TTL, health check interval, and failure threshold must remain unchanged so that recovery-time measurements are comparable with previous exercises.

Which change should a solutions architect recommend before repeating the exercise?

Show answerCORRECT ANSWER

Modify both Regional endpoints to return a compact readiness response within one second after the HTTP status code. Include READY_TO_SERVE entirely within the first 1,024 bytes only when the application and its required dependencies can process documents. Keep string matching enabled.

This fixes both causes of the baseline failures without weakening readiness detection. Route 53 requires the response body within two seconds after the status code, and the entire search string must appear within the first 5,120 bytes. A compact, promptly delivered response satisfies both constraints while preserving the meaning of the readiness marker.

Practice Failover in a full exam

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

Start a free practice exam

What is Failover

3 min read

Failover is a recovery mechanism that transfers responsibility from an unavailable or unhealthy component to another component capable of doing its work. The component might be an application server, database, network endpoint, or an entire deployment. Failover supports high availability by reducing the time a service remains unavailable after a failure. High availability is the objective; failover is one mechanism used to achieve it.

A practical failover design requires more than a spare server. It needs a way to detect failure, a healthy alternative with sufficient capacity, and a mechanism to redirect traffic or transfer processing responsibility. Health checks should reflect whether a component can perform useful work, not merely whether its operating system responds. Detection thresholds must balance fast recovery against unnecessary transfers caused by temporary network problems or brief performance slowdowns.

In AWS, a Region contains multiple Availability Zones, and each Availability Zone consists of one or more discrete data centers with independent power, networking, and connectivity. Deploying application instances across multiple Availability Zones reduces exposure to a single zone failure. For example, a web application can run instances in two zones behind a load balancer. If instances in one zone become unhealthy, the load balancer can direct new requests to healthy instances in the other zone. Multiple instances located only in one zone do not provide the same protection against a zone-wide disruption.

Application availability also depends on the data tier and other dependencies. A web tier distributed across zones can still become unavailable if it depends on a single database without a recovery alternative. A database failover design typically replicates data to another database resource and promotes or selects an eligible replica when the primary fails. Applications must handle broken connections, reconnect to the appropriate endpoint, and retry operations safely. Keeping user sessions only in an individual application server's memory can also interrupt users when traffic moves elsewhere.

Active-passive designs keep an alternative ready to take over, while active-active designs serve traffic from multiple resources and shift work to surviving resources after a failure. Either approach requires enough surviving capacity to handle the expected workload. Automatic scaling can replenish capacity, but provisioning takes time and should not be treated as instant protection against a sudden zone failure.

Failover involves cost and consistency trade-offs. Redundant capacity, data replication, monitoring, and testing increase expense and operational complexity. Asynchronous replication can leave a promoted replica missing recent writes. Synchronous replication can reduce that risk but adds coordination and latency. Recovery time objective describes the target time to restore service, while recovery point objective describes the acceptable amount of data loss measured in time.

Failover does not necessarily preserve existing connections, guarantee zero downtime, or protect against every failure. Multi-zone deployment addresses zone-level failures within a Region; protection against a regional outage requires a separate cross-Region strategy. Backups support restoration but do not, by themselves, provide a ready failover destination. Test failure scenarios regularly, prevent multiple nodes from incorrectly acting as the sole writer, and plan failback—the controlled return to the preferred resource after recovery.

Learn Failover in lessons

16 short lessons on Failover in 7 certification courses.

and 10 more lessons

Open the lessons