Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Distributed Database System Design

Visual Problem Diagram

Distributed Database System Design architecture diagram

Scenario

You update your profile while a network cut has split the US-East copy of the database from the EU-West copy. You expect the write to succeed once, or the database to refuse it. The painful failure is when both regions save a different value for that same row, because each side kept accepting writes and there is no agreed winner afterward.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

An app saves a new row. It reads that row later. It updates the row. It deletes the row. The same row is stored on more than one machine. A query goes to the machines that hold that row. An operator can move a group of rows to another machine while the database stays up.

You need to explain how rows are split across machines and how a query finds them. You need to explain how a second copy is kept and who may write when the writer dies. You need to explain which reads may be slightly old and which must see the newest write. You need to explain why a change that touches two groups of rows is expensive. A separate reporting warehouse can stay thin.

Constraints

Functional

The database can create, read, update, and delete a row. It keeps extra copies. It can keep a second lookup besides the row's own id. A transaction can cover one group of rows. An operator can move that group to another machine while queries keep running.

Non-functional

The database stays up about 99.99% of the time. A query can take a faster answer that may be slightly old, or wait for the newest write. A dead machine is replaced without a person copying files by hand. You can add machines to grow.

Scale

Petabytes of data. Millions of queries a second across the cluster, and that query rate is the heavy read. The rows are split into thousands of groups. More than one region.

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Not ready to design yet?

Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.

Try Coach free

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.

Want full access now? View Pro pricing