ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept

Read replicas

Copies of a database that serve reads. They add read capacity, not high availability.

Application
Primary
Replica, same Region
Replica, other Region
writesreadsasyncasync
Writes go to the primary. Reads can go to a replica, which copies the primary a little later.
  • Goal

    Read replica
    More read capacity
    Multi-AZ
    High availability
    Cache
    Faster repeated reads
  • Copy is

    Read replica
    Asynchronous
    Multi-AZ
    Synchronous
    Cache
    A copy of hot data
  • Serves reads

    Read replica
    Yes
    Multi-AZ
    Standby: no for a Multi-AZ DB instance. A Multi-AZ DB cluster has two standbys you can read from.
    Cache
    Yes
  • Failover

    Read replica
    Manual promotion
    Multi-AZ
    Automatic
    Cache
    None
  • Other Region

    Read replica
    Yes
    Multi-AZ
    No
    Cache
    Not by itself
Three tools that are often mixed up.

1 / 3

  • Goal

    Read replica
    More read capacity
    Multi-AZ
    High availability
    Cache
    Faster repeated reads
  • Copy is

    Read replica
    Asynchronous
    Multi-AZ
    Synchronous
    Cache
    A copy of hot data

2 / 3

  • Serves reads

    Read replica
    Yes
    Multi-AZ
    Standby: no for a Multi-AZ DB instance. A Multi-AZ DB cluster has two standbys you can read from.
    Cache
    Yes
  • Failover

    Read replica
    Manual promotion
    Multi-AZ
    Automatic
    Cache
    None

3 / 3

  • Other Region

    Read replica
    Yes
    Multi-AZ
    No
    Cache
    Not by itself
Three tools that are often mixed up.

What it is

A read replica is a read-only copy of an RDS database. The primary sends its changes to the replica asynchronously, so a replica can lag a little behind. You create replicas yourself, and RDS does not add or remove them for you. For MySQL, MariaDB and PostgreSQL you can have up to 15 per source. The replica can be in the same Region or in another Region.

Use replicas when reads are the bottleneck: reporting queries, a read-heavy website, or a read-only copy near users in another Region. The application must send its reads to the replica endpoint. Each replica has its own endpoint, so the application or a library has to split reads from writes.

What it is

A replica is not a high availability feature. Failover to a replica is manual: you promote it to a standalone database, and then point the application at it. For automatic failover, use Multi-AZ. A cross-Region replica is also a simple way to prepare for disaster recovery.

Remember

  • Asynchronous replication. Reads can return slightly old data.
  • Up to 15 replicas for MySQL, MariaDB and PostgreSQL. Cross-Region replicas are allowed.
  • Each replica has its own endpoint. The application chooses where to send reads.
  • Promote a replica to make it a standalone database. This is a manual step.

Remember

  • Replicas cost the same as a normal instance. Automated backups must be on in the source.
  • Aurora has its own replicas, up to 15, with a shared storage volume.

On the exam

  • “Reporting queries slow down the production database” points to a read replica.
  • “Automatic failover” points to Multi-AZ, not a read replica.
  • “Read-only copy of the database in another Region for local reads or disaster recovery” points to a cross-Region read replica.
  • “Same read load, but microsecond latency or repeated identical queries” points to a cache such as ElastiCache.