tezvyn:

Aurora vs Spanner architecture contrast

AI-drafted, machine-checkedSource: interviewadvanced
WHAT IT TESTS

deep architectural contrast.

OUTLINE

Aurora is single-writer with a shared distributed log-based storage and quorum, scaling reads; Spanner shards data with Paxos and TrueTime for global writes.

WHAT THIS TESTS This probes depth: can you contrast two architectures at the storage, consensus, and consistency layers and then map them to workloads.

STORAGE LAYER Aurora decouples compute from storage. The database engine does not write data pages; it ships redo log records to a purpose-built distributed storage service spread across six nodes in three availability zones, and storage materializes pages from the log. Writes use a quorum, typically four of six, and reads a smaller quorum, giving durability without full mirroring. Spanner stores data as sharded key ranges called splits, each backed by Colossus, and distributes splits across machines and zones for horizontal scale.

CONSENSUS AND WRITES Aurora has a single writer instance per cluster; replicas are read-only and share the same storage, so it scales reads but not writes within a region. Aurora Global Database adds asynchronous cross-region replicas. Spanner replicates each split with a Paxos group and supports multiple write leaders across shards, scaling writes horizontally, and uses TrueTime commit-wait for global ordering.

CONSISTENCY MODELS Aurora offers strong consistency within the primary region and eventual consistency on cross-region replicas. Spanner offers external consistency globally, the strongest guarantee.

WORKLOAD FIT Prefer Aurora for a regional, read-heavy, high-throughput relational workload where MySQL or PostgreSQL compatibility matters. Prefer Spanner when you need a single logical database spanning continents with strong consistency and write scalability, such as global inventory or financial ledgers.

LIKELY FOLLOW-UPS How does Aurora's log-is-the-database design cut write amplification. Why can Spanner scale writes but Aurora cannot within a region. What latency does TrueTime add.

ONE CONCRETE EXAMPLE A regional SaaS analytics product picks Aurora PostgreSQL for cheap read scaling and Postgres compatibility. A global payments platform that must serialize transactions across regions picks Spanner for external consistency and horizontal write scale.

Read the original → cloudthat.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.