🔄

IDs, Consistency & Coordination

Design the distributed algorithms that keep systems correct under failure

Consensus algorithms (Raft) Distributed locking Clock synchronization Fencing tokens

Unique ID Generator

Easy

Design Twitter Snowflake-style ID generation with time-ordering, no coordination, 64-bit IDs, and handling clock skew across data centers.

⏱ ~2.5h
Twitter/X Instagram Discord

Distributed Locking

Medium

Design a locking service like ZooKeeper with Raft consensus, session management, watch notifications, fencing tokens, and split-brain prevention.

⏱ ~3h
Google Amazon Redis

Resource Allocation

Hard

Design a Kubernetes-like scheduler with bin packing, gang scheduling, preemption, quota management, and multi-tenant fairness.

⏱ ~3.5h
Google Amazon Kubernetes

Distributed Tracing

Medium

Design Jaeger/Zipkin-like tracing with span collection, tail-based sampling, trace assembly, and sub-1% performance overhead.

⏱ ~3h
Google Uber Datadog

Batch Auditing

Medium

Design a CDC-based audit system with Debezium, Kafka streaming, compliance reporting (GDPR/SOX), and 7-year retention.

⏱ ~3h
Amazon Stripe