Design Exercise: Object Storage (S3-like)

Requirements

Architecture

Client ──► API Gateway ──► Metadata Service ──► Metadata DB │ (which nodes have this object?) ▼ Data Service ┌─────────┼─────────┐ ▼ ▼ ▼ Data Node Data Node Data Node (store chunks on local disks)

Key Design Decisions

Durability Math

// 3 replicas, each node has 0.1% annual failure rate
// P(all 3 fail) = 0.001^3 = 10^-9 = 99.9999999% durability
// With repair (replace failed replica quickly): even better