Amazon Aurora
Amazon Aurora is a managed relational database on AWS that's compatible with MySQL and PostgreSQL. Your application connects with an ordinary MySQL or Postgres driver and runs ordinary SQL. What's different is underneath: Aurora replaced the storage layer of those databases with a distributed storage service that spans three Availability Zones, keeps six copies of your data, and is written to with redo log records instead of data pages.
A few properties are worth separating:
- MySQL or Postgres on top: The query engine is the familiar one, with the same SQL, transactions, indexes and isolation levels. Most applications move to Aurora with configuration changes rather than code changes.
- Compute separated from storage: Database instances (the writer and any readers) don't own disks. They all attach to one shared cluster volume that grows automatically, up to well over 100 TiB.
- The log is the database: The writer sends only redo log records to storage. Storage nodes turn the log into data pages themselves, in the background. This removes most of the write amplification of a traditional database and is the key idea to explain.
- Single writer: A standard Aurora cluster has exactly one instance that accepts writes, plus up to 15 read replicas that share its storage. Aurora makes one primary much more durable, faster to fail over and easier to read-scale, but it doesn't spread writes across machines.
Aurora comes up in interviews as a practical answer to "which database?" for AWS-based designs: it's the "Postgres, but managed, more durable and with fast failover" option. Interviewers also like its storage design as a discussion topic, because quorum writes, log shipping and separation of compute from storage show up in many distributed systems. We'll cover how it works, where it helps, and where it doesn't.
Architecture
An Aurora cluster consists of one writer instance, zero to fifteen reader instances (Aurora Replicas), and one cluster volume.
But what is actually happening under the hood? The cluster volume is divided into protection groups of 10 GB each. Each protection group is stored as six segments on six different storage nodes, two in each of three Availability Zones. A 2 TB database is about 200 protection groups, spread over many storage nodes, each with six copies.
Aurora uses quorums on those six copies:
- A write is durable once 4 of 6 copies acknowledge it.
- A read that needs to reconstruct state (during recovery or repair) needs 3 of 6.
Since 4 + 3 > 6, every read quorum overlaps every write quorum, so a read quorum always includes at least one copy with the latest write. The numbers were chosen for specific failures:
- Lose a whole AZ (2 copies): 4 remain, so writes continue.
- Lose an AZ plus one more node (3 copies): 3 remain, so no data is lost and reads can rebuild the missing copies, though writes pause until enough copies are back.
Why six copies and not three? With three copies across three AZs and a 2-of-3 write quorum, an AZ outage plus one unrelated disk failure somewhere else would leave a single copy and could lose data. At the scale of a large cloud provider, some node is always failing, so planning for "AZ + 1" is realistic.
Small 10 GB segments matter too. Re-copying a failed segment takes on the order of seconds over a fast network, so the window in which a second failure could hurt is very short. That's much better than rebuilding a multi-terabyte disk.
In an interview, the two numbers to remember are six copies across three AZs and 4-of-6 writes, 3-of-6 reads. Combined with "it survives an AZ outage with no data loss and keeps accepting writes," that's usually all the storage detail anyone wants.