Design a Distributed OLTP Database
0%
Editorial Solution
System requirements
Functional
Capacity estimation
Connections and Throughput
API design
SQL Wire Protocol (PostgreSQL-Compatible)
Database design
Core Schema
High-level design
Gateway Layer (Stateless)
Request flows
Single-Shard Write
Detailed component design
Two-Phase Commit (2PC): Cross-Shard Atomicity
Trade-offs and tech choices
Synchronous vs. Asynchronous Replication
Failure scenarios and bottlenecks
Node Failure Mid-Transaction
Future improvements
Active-Active Multi-Region Writes
Table of Contents
Premium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockTry this problem yourself
Reading a solution is not the same as producing one under interview pressure. Design it on the whiteboard and get scored feedback.
0%
Editorial Solution
System requirements
Functional
Capacity estimation
Connections and Throughput
API design
SQL Wire Protocol (PostgreSQL-Compatible)
Database design
Core Schema
High-level design
Gateway Layer (Stateless)
Request flows
Single-Shard Write
Detailed component design
Two-Phase Commit (2PC): Cross-Shard Atomicity
Trade-offs and tech choices
Synchronous vs. Asynchronous Replication
Failure scenarios and bottlenecks
Node Failure Mid-Transaction
Future improvements
Active-Active Multi-Region Writes