Reliability and Continuity · Topic 3 of 5

Database and Storage Resilience

Compare RDS Multi AZ, read replicas, Aurora, DynamoDB global tables, ElastiCache, S3 and EFS so data survives instance, AZ and Region failures.

  • 5 min
  • Includes a diagram
In a nutshell
  • Multi AZ instance mode is synchronous, has automatic failover, and the standby serves no reads.
  • Read replicas are asynchronous and exist for read scaling and cross Region copies.
  • After failover, the endpoint DNS name stays the same and points to the new primary.

What it is

Servers can be replaced in minutes, but data cannot be recreated, so the data tier needs its own resilience plan. AWS offers different features for different goals, and the exam tests whether you can match the feature to the goal.

The main split is high availability inside a Region (Multi AZ) against read scaling (read replicas) against surviving a Region failure (cross Region replication).

Primary DBAZ asynchronous copyStandbyAZ bPrimary DBfailsDNS name moves toStandbybecomes primary

How it works

RDS Multi AZ

Amazon RDS (Relational Database Service) Multi AZ keeps a standby copy of the database in another AZ. In the classic instance deployment, writes are copied synchronously to the standby, and the standby does not serve reads.

If the primary fails, RDS promotes the standby and updates the DNS name of the endpoint, so the application reconnects with the same name. Failover also happens during some maintenance. Multi AZ DB clusters, a newer option, have two readable standby instances.

You can test a failover by rebooting with the failover option.

# AWS CLI: force a Multi AZ failover to test the setup
aws rds reboot-db-instance \
  --db-instance-identifier mydb \
  --force-failover

Read replicas

An application writes to the RDS primary in AZ a, which copies synchronously to a Multi AZ standby in AZ b that serves no reads, and asynchronously to a read replica that serves read traffic and to a cross Region replica that is promoted manually in disaster recovery. A read replica is a copy that receives changes asynchronously and serves read traffic. Replicas can be in the same Region or another Region. A replica can be promoted to a standalone database, which is useful in a disaster recovery plan, but promotion is a manual step and some recent writes can be lost because of lag.

FeaturePurposeReplicationServes reads
Multi AZ instanceHigh availabilitySynchronousNo
Multi AZ DB clusterHigh availability and read capacitySemi synchronousYes, on the standbys
Read replicaRead scaling, cross Region copyAsynchronousYes

Amazon Aurora

Aurora stores data in a shared cluster volume that is copied across three AZs, so storage survives the loss of a zone. Aurora Replicas read from the same volume and can be promoted quickly if the writer fails. Applications use the cluster endpoint for writes and the reader endpoint to spread reads.

For recovery from a Region failure, Aurora Global Database replicates to other Regions with low lag, and a secondary Region can be promoted.

DynamoDB and caches

Amazon DynamoDB already stores data across several AZs in a Region. Global tables copy a table to other Regions and allow writes in each of them, which gives low latency and Regional resilience. Point in time recovery protects against accidental writes or deletes.

Amazon ElastiCache for Redis can use replicas and automatic failover across AZs. A cache is not the source of truth, so the application must handle a cold cache.

Files and objects

  • S3 stores objects across at least three AZs in a Region for most storage classes. The One Zone classes keep data in one AZ and are less resilient.
  • Versioning and replication protect against overwrite and Regional loss. Cross Region Replication needs versioning on both buckets.
  • EFS Standard stores data across AZs, and One Zone EFS stays in one.
  • EBS volumes live in one AZ, so protect them with snapshots.
WriterRegion Aasync replicationSecondaryRegion BpromoteNew primaryafter disaster
Exam tip

"Needs to survive an AZ failure with automatic failover" points to Multi AZ. "Needs to scale reads" points to read replicas. "Needs to survive a Region failure" points to cross Region replicas, Aurora Global Database or DynamoDB global tables.

What to remember for the exam

  • Multi AZ instance mode is synchronous, has automatic failover, and the standby serves no reads.
  • Read replicas are asynchronous and exist for read scaling and cross Region copies.
  • After failover, the endpoint DNS name stays the same and points to the new primary.
  • Aurora keeps six copies of data across three AZs and uses cluster and reader endpoints.
  • Aurora Global Database and DynamoDB global tables handle Regional resilience.
  • S3 and EFS Standard span AZs, and EBS volumes live in one AZ.
  • Cross Region Replication in S3 requires versioning on source and destination.
  • Force a failover with reboot-db-instance --force-failover to test.

Common mistakes

Using a read replica for high availability. A replica does not fail over by itself, and promotion loses recent lag.

Expecting reads from the Multi AZ standby. The classic standby only waits, so it adds no read capacity.

Hard coding an instance IP address. After failover the IP changes, so use the DNS endpoint.

Forgetting that EBS is zonal. If the AZ fails, the volume is unavailable until you restore from a snapshot elsewhere.

Treating a cache as durable. ElastiCache can lose data, so the database must remain the source of truth.

Watch out

Multi AZ protects against infrastructure failure, not against mistakes. A dropped table is copied to the standby too, so you still need backups and point in time recovery.

Check yourself

Answer these three.

  • Which RDS feature gives automatic failover to another AZ?

    Multi AZ, which keeps a synchronous standby and moves the endpoint DNS name during failover.

  • What is the difference between Multi AZ and a read replica?

    Multi AZ is for availability with synchronous copy, and a read replica is for read scaling with asynchronous copy.

  • Which DynamoDB feature supports writes in several Regions?

    Global tables.

Topic 3 of 5 in Reliability and Continuity

Test yourself on Reliability and Continuity

The full AWS SOA-C03 question bank has 850 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.