HLDArena
HLD-306·Storage & Caching
Hard · 1,500 pts

Cloud Drive File Metadata & Delta Sync Engine

Design the metadata and conflict-resolution control plane for a cloud file-sync service handling enterprise Monday-morning client reconnections.

Max p99
≤ 115 ms
Availability
≥ 99.5%
Budget
≤ $6,400

Functional Requirements

  • FR-1GET /files/{workspace_id}/deltas — Returns ordered directory cursor changes since client revision.
  • FR-2POST /files/{workspace_id}/commit — Atomically commits new file revision CAS; rejects concurrent conflicting edits.
  • FR-3DELETE /files/{workspace_id}/deltas — Releases canceled or expired leases/holds atomically and immediately refreshes cached availability.
  • FR-4Zero silent file version overwrites or lost committed revisions across primary DB crash.

Workload Profile

Baseline Sync42,000 Delta Read RPS / 9,000 Revision Write RPS
Monday Reconnect Peak110,000 Read RPS / 26,000 Write RPS
Active Working Set34 GB hot directory trees & revision cursors
Contention ProfileShared team workspace_id folder contention

Consistency Model

Strict serializable revision CAS per file/workspace + RPO = 0 synchronous/quorum replication.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 230 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology