Skip to content

Primary SAA curriculum

Highly Available RDS App

Evolve a single-database web application so it survives database and Availability Zone failures, reconnects safely, and can recover from bad data.

6 min read

After this, you will understand

How a relational application combines managed failover, backup recovery, and reconnect behavior—and why read scaling is a different requirement.

Article guideprerequisites, mental models, and concepts

Article overview

intermediateCloudCertificationReliability

Three useful mental models

In plain terms

Use a private RDS Multi-AZ deployment for automatic failover, automated backups for recovery, and application retries so the service can reconnect after the writer changes.

Decision pressure

Learners use a read replica as the automatic failover answer, treat a standby as a backup, or forget that active database connections can break during failover.

Exam-ready model

Separate four requirements: Multi-AZ for availability, read replicas for read scale, backups for recovery, and application connection handling for the failover transition.

Think before reading

If Multi-AZ copies a mistaken DELETE to the standby, which RDS feature can return the database to a point before that mistake?

Automated backups and point-in-time recovery create a new database restored to a chosen time within the retention window.

Connected learning

These lessons add useful context to the current core lesson.
  1. 1RDS Multi-AZ vs Read ReplicasAWS Reference
  2. 2Static Site With CloudFront And S3AWS Scenario

Highly Available RDS App — Quick Learn

Two application servers can survive one server failure, but both still depend on one relational database. If that database or its Availability Zone becomes unavailable, healthy web servers have nowhere to read or write business data.

The architecture needs different answers for four requirements:

infrastructure failure → Multi-AZ standby
bad data → backups and point-in-time recovery
read overload → read replica
writer change → application reconnect and safe retry

Amazon RDS is AWS's managed relational database service. These mechanisms all involve another copy or connection, but their jobs are not interchangeable.

The standby supports availability, the read replica adds read capacity, and backups recreate historical data. These copies are not interchangeable.

Start With The Job Of Each Copy

Multi-AZ standby: current replacement capacity

In the classic RDS Multi-AZ DB instance deployment, one primary serves reads and writes while RDS synchronously keeps a standby current in another Availability Zone (AZ), an isolated location in the same Region. The standby is reserved for managed failover; the application cannot send reporting reads to it.

If RDS detects a supported primary or AZ failure, it promotes the existing standby and updates the DNS record behind the same RDS endpoint name. This is faster than constructing a database from a backup because the replacement already exists and is kept current.

Automated backups and PITR: historical recovery

A destructive migration can replicate to the standby because the database is healthy and accepting the change. Automated backups and transaction logs preserve a recovery window. Point-in-time recovery (PITR) rebuilds data at a selected restorable time in a new DB instance; it does not rewind the running production instance.

The team must validate that new instance and deliberately move the application or reconcile the required data. A manual snapshot provides a named checkpoint, such as immediately before a risky migration.

Read replica: additional read capacity

A read replica normally receives changes asynchronously, has its own endpoint, and serves suitable read-only traffic. Because replication can lag, it may briefly return older data. Send reports or stale-tolerant reads there; keep writes and reads requiring the newest state on the writer.

Promoting a classic read replica creates an independent database, after which the team must redirect the application. That is not the normal managed Multi-AZ failover path.

Read deeper into backups, snapshots, and point-in-time recovery

Failover Still Interrupts Connections

RDS performs database failover. The application still owns connection recovery and safe retry behavior.

The endpoint name remains stable, but its destination changes. Existing TCP sessions still point to the old primary and can break. A connection pool is the reusable set of database connections kept by the application; after failover, it may still contain those broken sessions.

primary fails
↓
RDS detects the condition and promotes the standby
↓
RDS endpoint DNS changes to the new primary
↓
application discards broken pooled connections
↓
application resolves the endpoint and reconnects
↓
safe operations retry a limited number of times with increasing pauses

Writes need special care. The database may commit CreateOrder before the connection breaks, while the success response never reaches the application. Blindly retrying could create two orders. An idempotency key, uniqueness constraint, transaction identifier, or business check must make the retry safe.

RDS Proxy can reuse connections and reduce some failover disruption for supported databases. It does not replace backups or make unsafe writes idempotent.

Read deeper into connection recovery, bounded retries, and RDS Proxy

Placement And Access Remain Separate Controls

A DB subnet group lists the subnets where RDS may place resources. Include private database subnets in multiple AZs, but remember: the subnet group provides placement options; it does not create a standby by itself and is not a network hop.

Set the normal database to not publicly accessible. Its security group should admit the database port from the application security group, not from the internet or an unnecessarily broad network range. Store database credentials in Secrets Manager or another approved secret store, and use TLS and encryption at rest when required.

Private placement removes a direct public route. It does not remove the need for security groups, database authentication, IAM controls over RDS management actions, or KMS permission for encrypted snapshots.

Test The Complete User Recovery

RDS can finish promoting the standby before users recover because application pools may still hold broken connections. A failover exercise should measure the user-visible sequence, not merely the RDS event duration.

Test backup restoration separately. A failover test proves a current standby can take over; it does not prove the team can restore, validate, and cut over to historical data.

SAA Recognition And Traps

  • Automatic recovery from an RDS instance or AZ failure → RDS Multi-AZ, because a current standby already exists for managed promotion.
  • Recover before an accidental deletion or bad migration → automated backups + PITR, because the standby contains the harmful current state too.
  • Scale read-heavy traffic → read replica, with explicit application read routing and tolerance for replication lag.
  • Many connections overwhelm the database → bounded pools or RDS Proxy; adding application instances can otherwise create even more database connections.
  • Stable endpoint after failover → the name remains, but clients must reopen broken connections after its DNS target changes.
  • Entire Region unavailable → a separate cross-Region recovery design. Multi-AZ stays inside one Region.

Do not assume the classic Multi-AZ standby serves reads, PITR restores in place, a read replica automatically replaces the writer, or database failover automatically repairs application connections.

RDS Multi-AZ DB clusters are a different deployment type with readable standbys, and Aurora has its own writer-and-reader architecture. Identify the deployment type before applying the classic DB instance model.

One-Minute Review

Private primary + synchronous standby in another AZ → availability
Endpoint DNS changes after promotion → application must reconnect
Backups + transaction logs → historical restore into a new DB
Asynchronous read replica + separate endpoint → read scaling
Safe bounded retries → application recovery without duplicate writes

If you remember only one thing: choose a database copy by its job—standby for failover, replica for reads, backup for older data—and make the application reconnect safely.

Finished reading?

Your reading history is saved in this browser so you can continue later.

Recommended Next

Static Site With CloudFront And S3AWS Architecture Scenarios20 min read

This applies the foundation mental models to a real architecture decision instead of a service inventory.

Optional exploration

These links add context, but they do not replace the recommended next lesson.

Arcflow Plus is coming — review drills, research breakdowns, more AI. Get one email at launch.