6.66 - AWS RDS Read Only Replicas vs Multi Replica AZ.mp4
This lesson goes deeper into RDS by comparing two replication patterns. A read replica is a read-only copy of the master designed to scale read capacity. You can have up to five read replicas per master, within the same AZ, across different AZs, or even across regions. Replication is asynchronous: writes go to the master and are then replicated to the replicas with a small lag. Your application can route read-only queries to the replicas to offload the master.
Use cases and trade-offs
- Read replicas are great for analytics, reporting, dashboards that don't need real-time consistency.
- Eventually consistent — write returns OK only on the master, replicas catch up shortly after.
- Read replicas can be promoted into autonomous primary instances after a failure.
- Only
SELECTqueries are allowed on read replicas;INSERT,UPDATE,DELETEall go to the master. - Cross-AZ or cross-region replication incurs network transfer fees. Same-AZ replicas avoid that cost.
The multi-AZ deployment is a different feature aimed at high availability and disaster recovery. RDS creates a synchronous standby in a second AZ — identical to the primary, replicated in real time. The standby is not used for reads; it stays idle. AWS exposes a single DNS endpoint that automatically points to the live primary. If the primary fails (instance, storage, network), RDS performs an automatic failover, the standby is promoted to primary, and the DNS endpoint follows — your application reconnects seamlessly.
Key distinction: read replicas = scale reads, while multi-AZ = automatic failover. Multi-AZ replicas are not used for scaling because they stay idle. To enable disaster recovery, you must configure the database in multi-AZ mode at creation time (or via modify). For best resilience, many production patterns combine multi-AZ for HA with read replicas in the same AZ to avoid network transfer fees. We'll see how to configure both in the next labs.
Summary
AWS RDS read-only replicas enable horizontal scaling by offloading read operations from the master database instance, supporting up to five replicas within a single availability zone or across multiple regions. Multi-AZ replicas provide synchronous replication and automatic failover capabilities for disaster recovery, distinct from asynchronous read-only replicas used for performance optimization. Understanding the trade-offs—including network transit costs and failover automation—is essential for designing robust and cost-effective database architectures.
Key points
- Read-only replicas use asynchronous replication to distribute read traffic and reduce master database load, accepting eventual consistency in exchange for improved scalability
- Up to five read-only replicas can be deployed within the same AZ, across multiple AZs, or different regions, with cross-AZ replication incurring data transfer costs
- Read-only replicas enforce SELECT-only access; all INSERT, UPDATE, and DELETE operations must be directed to the master instance
- Multi-AZ replicas employ synchronous replication and DNS-based automatic failover for disaster recovery and high availability—not for scaling read capacity
- Promoting a read-only replica to a standalone master requires application connection string updates to redirect traffic from the failed master to the promoted instance
- Multi-AZ deployments eliminate manual failover intervention, making them suitable for production workloads requiring automated recovery from zone-level failures
FAQ
What is the difference between read-only replicas and multi-AZ deployments in AWS RDS?
Read-only replicas are asynchronous copies designed for scaling read capacity across one or multiple availability zones or regions, allowing applications to distribute SELECT queries without affecting the master. Multi-AZ deployments use synchronous replication within a single region to provide automatic failover and high availability during master instance failures—they are not intended for performance scaling.
How can I reduce data transfer costs when using RDS read-only replicas?
Deploy read-only replicas within the same availability zone as the master to avoid cross-AZ network traffic charges. If replicas must span multiple AZs or regions for disaster recovery or geographic distribution, expect network transit fees; evaluate cost-benefit trade-offs based on your monitoring and reporting requirements.
What operations can I perform on an RDS read-only replica?
RDS read-only replicas support SELECT queries only. INSERT, UPDATE, DELETE, and ALTER operations must be executed on the master instance. If a replica is promoted to a standalone master following a primary failure, it becomes writable and requires application connection strings to be updated immediately.