Volume 5 · Chapter 3 — Storage and Databases

Relational Databases: RDS and Aurora

Goutham Mayaluri 9 min read AWSCloudRDSAuroraStorageDatabases

3.1 Introduction

Banks run on relational databases - the system of record for accounts, transactions, and balances demands the structure, integrity, and transactional guarantees relational databases provide. AWS offers RDS (managed relational database service) and Aurora (its high-performance cloud-native relational engine) so you get those guarantees without operating the database infrastructure yourself. This chapter covers what RDS and Aurora provide, how Multi-AZ delivers high availability, and how read replicas scale reads - all frequent interview topics tied directly to reliability and the data that matters most.

3.2 RDS: Managed Relational Databases

RDS runs relational database engines - PostgreSQL, MySQL, and others - as a managed service, taking over the operational work: provisioning, patching the database and OS, backups, and failure recovery. You get a standard relational database with full SQL and ACID transactions, but AWS handles the undifferentiated maintenance. This is the shared responsibility model applied to databases: AWS manages the engine and infrastructure, while you’re responsible for the schema, queries, access control, and the data. For a bank, RDS means running PostgreSQL for its transactional system of record without a team manually patching and backing up database servers - the managed service does it more reliably.

3.3 Multi-AZ for High Availability

RDS Multi-AZ is the key high-availability feature. When enabled, RDS maintains a synchronous standby replica in a different Availability Zone, kept continuously up to date with the primary. If the primary fails - or its AZ fails - RDS automatically fails over to the standby, promoting it to primary, typically within a short window, with the database endpoint automatically pointing to the new primary. This gives automatic recovery from database and AZ failures without manual intervention or data loss (the standby is synchronous). Multi-AZ is about availability, not scaling - the standby doesn’t serve reads; it’s there to take over. For a bank’s system of record, Multi-AZ is essential: the database survives an instance or AZ failure with minimal downtime and no lost committed data.

flowchart TB
  App[Application] --> EP[(RDS endpoint)]
  subgraph AZa[AZ A]
      Primary[(Primary - reads + writes)]
  end
  subgraph AZb[AZ B]
      Standby[(Synchronous standby - failover target)]
  end
  EP --> Primary
  Primary -. synchronous replication .-> Standby
  Primary -. on failure: auto-failover, endpoint repoints .-> Standby
  Primary --> RR1[(Read replica - scales reads, async)]

3.4 Read Replicas for Scaling Reads

Where Multi-AZ addresses availability, read replicas address read scaling. A read replica is an asynchronous copy of the database that serves read-only queries, so you offload read traffic - reports, dashboards, read-heavy lookups - from the primary, which continues to handle all writes. You can have several replicas to scale reads horizontally, and because replication is asynchronous, replicas may lag slightly behind the primary (eventual consistency for reads). The distinction to remember: Multi-AZ standby is synchronous and for failover (not reads), while read replicas are asynchronous and for scaling reads (not automatic failover). A read-heavy banking workload - many balance and statement lookups against far fewer writes - uses read replicas to scale the reads while the primary handles the authoritative writes.

3.5 Aurora: Cloud-Native Relational

Aurora is AWS’s cloud-native relational database, compatible with PostgreSQL and MySQL, re-engineered for the cloud with a distributed storage layer. It delivers higher performance and throughput than standard engines, storage that automatically grows and is replicated six ways across three Availability Zones for durability, faster and more automated failover, and up to many low-latency read replicas that share the same storage. It keeps full relational and transactional guarantees while improving availability, durability, and scale. Aurora Serverless can even scale capacity automatically with load. For a bank wanting relational integrity with cloud-native performance and resilience, Aurora is the higher-end choice; standard RDS engines remain a solid, more economical option when Aurora’s extra performance and resilience aren’t required.

3.6 Banking Production Scenario

A bank runs its transactional system of record on Aurora PostgreSQL for cloud-native performance and resilience: storage is replicated six ways across three AZs, failover is fast and automatic, and the full ACID guarantees the ledger requires are preserved. The primary handles all account and transaction writes, while several low-latency read replicas serve the heavy read traffic - balance checks, statement views, dashboards - so reads scale without loading the write path. The database runs in private subnets, is encrypted at rest with KMS and in transit with TLS, is accessed only by the application’s security group and role, and is backed up automatically with point-in-time recovery. Multi-AZ resilience plus read replicas gives the bank a highly available, read-scalable, strongly-consistent system of record.

3.7 Troubleshooting: Relational Database Issues

Database issues have common patterns. Read-heavy load slowing the primary means reads should be offloaded to read replicas. Stale data from a replica is expected replica lag (asynchronous) - route reads needing the latest data to the primary, and tolerate slight lag on the rest. A failover causing a brief outage is Multi-AZ working as designed; applications should reconnect through the endpoint (which repoints) and retry transient errors. Running out of storage or connections points to capacity limits - scale storage (automatic on Aurora) or use connection pooling. Slow queries usually need indexing or query tuning, which remain the customer’s responsibility even on a managed service. The diagnostic approach separates availability concerns (Multi-AZ failover, endpoint reconnection) from scaling concerns (read replicas, connection pooling) from data-model concerns (indexes, query design).

Interview Question

What's the difference between RDS Multi-AZ and read replicas, and when do you use each?

Multi-AZ and read replicas are two different RDS features that solve two different problems - availability versus read scaling - and confusing them is a common mistake. Multi-AZ is a high-availability feature. When enabled, RDS maintains a synchronous standby replica in a different Availability Zone, kept continuously and synchronously up to date with the primary. Its purpose is automatic failover: if the primary instance fails or its entire AZ fails, RDS automatically promotes the standby to primary, usually within a short window, and the database endpoint automatically repoints to the new primary, so the application recovers with minimal downtime and no lost committed data - because replication to the standby is synchronous. Critically, the Multi-AZ standby does not serve read traffic; it exists solely to take over on failure. So Multi-AZ is about availability and durability, not performance. Read replicas solve the opposite problem: scaling reads. A read replica is an asynchronous copy of the database that serves read-only queries, letting you offload read-heavy traffic - reports, dashboards, lookups - from the primary, which continues to handle all writes. You can have multiple replicas to scale reads horizontally. Because replication to a read replica is asynchronous, replicas can lag slightly behind the primary, so reads from them are eventually consistent, and read replicas do not provide automatic failover the way Multi-AZ does. So the clean distinction is: Multi-AZ standby is synchronous and exists for automatic failover and availability (it doesn’t serve reads); read replicas are asynchronous and exist for scaling read throughput (they don’t auto-failover). When do I use each? I use Multi-AZ for any production database that needs high availability - which for a bank’s system of record is essential, so the database survives an instance or AZ failure automatically without data loss. I use read replicas when the workload is read-heavy and I need to scale reads beyond what the primary can handle - a banking workload with far more balance and statement lookups than writes offloads those reads to replicas while the primary handles authoritative writes. They’re complementary and often used together: Multi-AZ for availability of the write path, read replicas for scaling the read path. The key things to land are synchronous-standby-for-failover versus asynchronous-replica-for-read-scaling, and that only Multi-AZ provides automatic failover while only read replicas serve reads.

Interview Question

Why use a managed database like RDS or Aurora instead of running your own on EC2, and what does Aurora add?

I use a managed database like RDS or Aurora because it removes the substantial, undifferentiated operational burden of running a database while giving me the same relational and transactional guarantees, and it does that work more reliably than a team typically can by hand. Running your own database on EC2 means you’re responsible for provisioning, patching the database engine and operating system, configuring and testing backups, setting up replication and failover, and recovering from failures - all critical, error-prone work that doesn’t differentiate your business. RDS takes over exactly that: it runs standard engines like PostgreSQL and MySQL as a managed service, handling provisioning, patching, automated backups, and failure recovery, while you keep responsibility for the schema, queries, access control, and data - the shared responsibility model applied to databases. So for a bank running PostgreSQL as its system of record, RDS means getting a robust, backed-up, patchable, highly-available database without a team manually operating database servers, which is both more reliable and frees engineers for higher-value work. It also provides Multi-AZ for automatic failover and read replicas for read scaling as managed features rather than things you build yourself. Aurora adds cloud-native performance and resilience on top of that managed model. It’s AWS’s relational database compatible with PostgreSQL and MySQL but re-engineered for the cloud with a distributed storage layer, and it delivers higher performance and throughput than the standard engines; storage that grows automatically and is replicated six ways across three Availability Zones for very high durability; faster, more automated failover; and up to many low-latency read replicas that share the same underlying storage, making read scaling more efficient. It keeps full ACID and relational guarantees while improving availability, durability, and scale, and Aurora Serverless can scale capacity automatically with load. The trade-off is cost: Aurora is a higher-end option, so I choose it when I want relational integrity with cloud-native performance and resilience - a bank’s core ledger benefits from its durability and fast failover - and I use standard RDS engines when they’re sufficient and more economical. So the answer is: managed databases remove operational burden and improve reliability while preserving relational guarantees, and Aurora goes further with cloud-native performance, six-way multi-AZ storage durability, faster failover, and efficient read scaling - at a higher cost justified for demanding, critical workloads.

Chapter Revision Notes

  • RDS runs managed relational engines (PostgreSQL, MySQL): AWS handles provisioning, patching, backups, failover; you own schema, queries, access, data.
  • Multi-AZ = synchronous standby in another AZ for automatic failover (availability); the standby does not serve reads.
  • Read replicas = asynchronous copies that serve read-only queries to scale reads; may lag; no auto-failover.
  • Aurora = cloud-native relational (PostgreSQL/MySQL-compatible): higher performance, six-way storage across 3 AZs, fast failover, efficient read replicas.
  • Managed databases remove operational burden more reliably than self-managed on EC2 while preserving ACID guarantees.