← Amazon Interview Insights

Amazon·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

Pretty intense system design round at Amazon focused almost entirely on Aurora internals and database engine theory. If you're not comfortable going deep on storage architecture, replication, and concurrency control, this one will hurt.

Questions Asked (6)

Q1

How does Aurora's storage architecture differ from a traditional MySQL or Postgres deployment, and what are the implications of separating compute from storage?

System DesignTechnical Trade-offs
Author's notes

This was the opener and I thought I had it, but I kept framing it like a normal replication setup and the interviewer kept pushing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by contrasting the traditional monolithic database architecture with Aurora's decoupled compute and storage layers. Then explain how this separation enables independent scaling, replication, and fault tolerance, and discuss the trade-offs such as increased network latency and complexity. Finally, tie the implications to real-world benefits like improved availability and performance at scale.

Pro tip: Emphasize that Aurora's storage layer is a distributed, fault-tolerant, self-healing system with six-way replication across three AZs, which is a key differentiator from traditional databases. Also, mention that while separation introduces network overhead, it enables features like fast failover and read replicas with minimal lag.

1. Describe traditional architecture

Explain that traditional MySQL/Postgres deployments tightly couple compute (query processing) and storage (data persistence) on the same server, often with local disks or shared storage like SAN/NAS.

2. Introduce Aurora's separation

Detail how Aurora separates compute (database instances) from storage (a distributed, replicated storage service), allowing each to scale independently.

3. Explain storage layer specifics

Highlight that Aurora's storage is a fault-tolerant, self-healing system with six copies across three Availability Zones, and it only writes redo logs to storage, reducing network traffic.

4. Discuss implications and trade-offs

Cover benefits like independent scaling, faster replication, and high availability, as well as trade-offs such as increased network latency and complexity in managing a distributed system.

5. Relate to use cases and Amazon context

Connect the architecture to Amazon's scale and reliability requirements, mentioning how it supports read replicas, global databases, and serverless offerings like Aurora Serverless.

Key Points to Mention

  • Decoupling of compute and storage enables independent scaling and better resource utilization.
  • Aurora's storage is a distributed, multi-AZ replicated service with six-way replication and self-healing capabilities.
  • Only redo log records are sent to storage, reducing network I/O compared to traditional page writes.
  • Read replicas share the same storage volume, leading to low replication lag and high read scalability.
  • Trade-offs include increased network latency for writes and added complexity in failure handling.
  • Aurora's design supports fast failover (typically <30 seconds) and continuous backup to S3.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Walk me through how Aurora handles replication across availability zones, including how the quorum model works and why that design was chosen.

System DesignTechnical Trade-offs
Author's notes

Six copies across three AZs, write quorum of four, read quorum of three.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the high-level architecture of Aurora's storage layer, then dive into the quorum model (6 copies across 3 AZs, write quorum of 4, read quorum of 3) and how it ensures fault tolerance. Finally, discuss the trade-offs and reasons behind this design, such as latency, durability, and availability.

Pro tip: Emphasize that the quorum model allows Aurora to tolerate the loss of an entire AZ plus an additional node without losing write availability, and mention that reads can be served from any AZ with low latency. This shows you understand both the resilience and performance benefits.

1. Describe the storage architecture

Explain that Aurora decouples compute from storage, with a distributed, shared storage volume replicated across three Availability Zones (AZs). Each AZ hosts two copies of the data, totaling six copies.

2. Explain the quorum model

Detail that writes require a quorum of 4 out of 6 copies (acknowledged by at least 4 nodes), and reads require a quorum of 3 out of 6. This ensures consistency and durability.

3. Discuss fault tolerance and availability

Highlight that the quorum model allows Aurora to tolerate the failure of an entire AZ (2 copies) plus one additional node without impacting write availability. Reads can continue with only 3 copies.

4. Explain the rationale behind the design

Discuss why this design was chosen: it balances durability, availability, and performance. It avoids the need for costly synchronous replication across all copies, reduces latency, and enables fast failover.

5. Mention trade-offs and optimizations

Talk about trade-offs such as increased write latency due to quorum, but mitigated by parallel writes and asynchronous replication to other AZs. Also mention how Aurora uses gossip protocols for failure detection and repair.

Key Points to Mention

  • Aurora replicates data 6 ways across 3 AZs (2 copies per AZ).
  • Write quorum is 4 out of 6; read quorum is 3 out of 6.
  • Tolerates AZ failure plus one additional node failure without losing write availability.
  • Quorum model ensures consistency and durability while minimizing latency.
  • Design avoids synchronous replication across all copies, improving performance.
  • Uses gossip protocols for failure detection and repair, and continuous backup to S3.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Explain the role of the write-ahead log in crash recovery, and describe how Aurora's approach differs from the traditional checkpoint-and-redo flow.

System DesignTechnical Trade-offs
Author's notes

Traditional databases periodically flush dirty pages and write a checkpoint so crash recovery only replays log from that point.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the fundamental purpose of a write-ahead log (WAL) in ensuring durability and atomicity in traditional databases, then contrast it with Aurora's architecture where the log is the database and storage handles redo processing. Highlight how Aurora's design reduces network I/O and enables faster crash recovery by pushing redo down to the storage layer.

Pro tip: Emphasize that Aurora's approach eliminates the need for traditional checkpoints and redo logging at the database layer, which is a key innovation that improves performance and availability. Mention that this design allows for continuous backup and point-in-time recovery without impacting foreground performance.

1. Explain WAL in traditional databases

Describe how WAL works: before modifying data pages, changes are written to a log, ensuring durability and atomicity. On crash, the database replays the log from the last checkpoint to recover.

2. Describe traditional checkpoint-and-redo flow

Explain that checkpoints periodically flush dirty pages to disk, and after a crash, the database redoes log records since the last checkpoint to bring the database to a consistent state.

3. Introduce Aurora's architecture

Explain that Aurora separates compute from storage, with a distributed storage layer that handles replication and durability. The database only writes log records to storage, not data pages.

4. Contrast Aurora's approach

Highlight that in Aurora, the storage layer applies redo log records to data pages, eliminating the need for checkpoints and redo at the database layer. This reduces network I/O and enables faster recovery.

5. Discuss implications and trade-offs

Mention benefits like faster crash recovery, lower latency, and continuous backup. Acknowledge trade-offs such as increased complexity in storage and potential for longer recovery if storage is unavailable.

Key Points to Mention

  • WAL ensures durability and atomicity by writing log records before data pages.
  • Traditional recovery uses checkpoints and redo logging to replay changes after a crash.
  • Aurora's log is the database: only log records are sent to storage, which applies them to data pages.
  • Aurora eliminates checkpoints and redo processing at the database layer, reducing network I/O.
  • Storage layer handles replication, durability, and redo, enabling faster recovery and continuous backup.
  • Trade-offs include increased storage complexity and potential recovery time if storage is degraded.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How does MVCC work, and why does it allow readers to not block writers?

System DesignData Modeling
Author's notes

Felt like a bit of a breather after the Aurora-specific stuff.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining MVCC as a concurrency control method that maintains multiple versions of data to provide snapshot isolation. Explain that readers access a consistent snapshot without acquiring locks, while writers create new versions, thus avoiding read-write conflicts. Conclude by discussing trade-offs like storage overhead and garbage collection.

Pro tip: Relate MVCC to Amazon's high-throughput systems, emphasizing how it enables read-heavy workloads to scale without contention, and mention specific implementations like PostgreSQL or Amazon Aurora's use of MVCC.

1. Define MVCC

Explain that MVCC (Multiversion Concurrency Control) allows multiple versions of a data item to exist simultaneously, enabling readers to access a consistent snapshot without blocking writers.

2. Explain versioning mechanism

Describe how each write creates a new version with a timestamp or transaction ID, and how readers use their snapshot to determine which version to read.

3. Contrast with locking

Highlight that traditional locking blocks readers during writes, while MVCC avoids this by letting readers read older versions, thus non-blocking.

4. Discuss isolation levels

Mention that MVCC supports snapshot isolation and can prevent anomalies like dirty reads, but may allow write skew unless serializable isolation is used.

5. Address trade-offs

Note challenges such as increased storage, version cleanup (vacuum), and potential for longer transaction chains affecting performance.

Key Points to Mention

  • Snapshot isolation and consistent reads
  • Version storage and timestamps/transaction IDs
  • Non-blocking reads and writes
  • Garbage collection of old versions
  • Write skew and serializable isolation
  • Real-world implementations (e.g., PostgreSQL, Oracle, Amazon Aurora)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How does a database engine handle lock conflicts under high write concurrency, including row-level locks, gap locks, and deadlock detection?

System DesignTechnical Trade-offs
Author's notes

Gap locks tripped me up a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the fundamental purpose of locks in a database engine and how they enable concurrent transactions while maintaining isolation. Then, systematically describe the lock types (row-level, gap, table) and how they are acquired and released, focusing on conflict scenarios under high write concurrency. Finally, discuss deadlock detection and resolution mechanisms, and tie it back to trade-offs between concurrency, performance, and consistency, using examples from real systems like InnoDB or PostgreSQL.

Pro tip: Demonstrate depth by mentioning specific implementation details, such as how InnoDB uses next-key locking to prevent phantoms, or how deadlock detection uses a wait-for graph with cycle detection. Also, relate the discussion to Amazon's scale by noting how high concurrency demands efficient lock managers and sometimes optimistic concurrency control to reduce contention.

1. Define locking and concurrency control

Explain that locks are used to enforce isolation levels (e.g., read committed, repeatable read) and prevent anomalies like dirty reads, lost updates, and phantoms. Mention that under high write concurrency, lock conflicts are inevitable and must be managed efficiently.

2. Describe lock granularity and types

Cover row-level locks (shared and exclusive) and gap locks (used in InnoDB to lock index ranges and prevent phantom reads). Explain how lock granularity affects concurrency: finer granularity (row-level) allows more concurrency but higher overhead; coarser (table-level) reduces overhead but limits concurrency.

3. Explain lock conflict handling

Discuss how the engine detects conflicts when a transaction requests a lock incompatible with an existing one. Describe strategies: blocking (waiting) with timeouts, or immediate failure (e.g., NOWAIT). Mention lock queues and fairness to prevent starvation.

4. Detail deadlock detection and resolution

Explain that deadlocks occur when transactions wait on each other cyclically. Describe detection via wait-for graph and cycle detection, and resolution by aborting a victim transaction (often the one with least work). Mention deadlock avoidance techniques like lock ordering and timeout-based detection.

5. Discuss trade-offs and real-world optimizations

Highlight trade-offs: blocking vs. aborting, lock granularity vs. overhead, and isolation level vs. concurrency. Mention optimizations like multi-version concurrency control (MVCC) to reduce read-write conflicts, and optimistic concurrency control for low-contention scenarios.

Key Points to Mention

  • Row-level locks: shared (S) and exclusive (X) locks, and their compatibility matrix.
  • Gap locks and next-key locking in InnoDB to prevent phantom reads under repeatable read isolation.
  • Deadlock detection using wait-for graph and cycle detection, with victim selection heuristics.
  • Lock escalation (e.g., from row to table) and its impact on concurrency.
  • MVCC as an alternative to locking for reads, reducing contention.
  • Trade-offs between isolation levels (e.g., read committed vs. repeatable read) and concurrency.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

What are the core trade-offs between consistency, latency, and throughput in a cloud-native database, and how do you reason about them when designing a system?

Technical Trade-offsSystem Design
Author's notes

Classic CAP-adjacent territory but framed more practically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the three properties and explaining the fundamental trade-offs (e.g., CAP theorem, PACELC). Then, walk through a concrete system design example, showing how you would reason about and prioritize these trade-offs based on business requirements and SLAs. Conclude with how you would measure and monitor these metrics in production.

Pro tip: Emphasize that trade-offs are not binary; modern databases offer tunable consistency levels and you should discuss how to leverage them. Also, mention that latency and throughput are often inversely related and you need to find the sweet spot for your workload.

1. Define the properties and their relationships

Clearly define consistency, latency, and throughput. Explain how they interact: stronger consistency often increases latency and reduces throughput; optimizing for low latency can sacrifice consistency; high throughput may require relaxing consistency.

2. Relate to theoretical models (CAP, PACELC)

Mention CAP theorem and PACELC to show theoretical grounding. Explain that in a distributed system, during a network partition, you must choose between consistency and availability; otherwise, you trade latency for consistency.

3. Analyze business requirements and SLAs

Discuss how to gather requirements: what does the application need? For example, financial transactions require strong consistency, while social media feeds can tolerate eventual consistency. Map these to SLAs for latency and throughput.

4. Design with tunable trade-offs

Describe how to choose database technologies and configurations that allow tuning. For instance, use quorum reads/writes, select appropriate consistency levels, and employ caching or read replicas to improve latency and throughput where acceptable.

5. Monitor and iterate

Explain the importance of measuring latency (p50, p99), throughput, and consistency violations in production. Use this data to adjust trade-offs dynamically, such as scaling read replicas or changing consistency levels.

Key Points to Mention

  • CAP theorem and PACELC: consistency vs availability under partition, latency vs consistency otherwise.
  • Tunable consistency in databases like DynamoDB, Cassandra, or Cosmos DB (e.g., strong vs eventual consistency).
  • Latency vs throughput: batching improves throughput but increases latency; smaller payloads reduce latency but may lower throughput.
  • Use of caching, read replicas, and quorum to balance trade-offs.
  • Real-world examples: Amazon DynamoDB for shopping cart (eventual consistency for availability) vs banking systems (strong consistency).
  • Monitoring and metrics: p99 latency, throughput (QPS), and consistency violations to inform adjustments.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.