Topic hub
System Design Problems
Worked designs: URL shortener, rate limiter, chat, news feed, payments, ticketing and more.
Lessons
- Event-Driven Architecture · Software Architecture Foundations
Design systems around events, asynchronous workflows, and eventual consistency. - Microservices and Modular Monoliths · Software Architecture Foundations
Compare service boundaries with deployability, ownership, and operational cost. - Sagas, Outbox, and Consistency · Software Architecture Foundations
Coordinate distributed workflows without pretending one global transaction exists. - Resilient Service Integrations · API Architecture and Integration Design
Timeouts, retries, circuit breakers, bulkheads and graceful degradation. - Scaling Patterns · Caching and Performance Engineering
Stateless services, read replicas, sharding, queues and CDNs. - CAP and PACELC · Distributed Systems for Backend Engineers
What the theorems really say and how to use them. - Consistency Models · Distributed Systems for Backend Engineers
Linearizability, sequential, causal, read-your-writes and eventual consistency. - Distributed Transactions: 2PC vs Sagas · Distributed Systems for Backend Engineers
Atomicity across services and databases. - Real-World Architectures: DynamoDB, Spanner and Kafka · Distributed Systems for Backend Engineers
How production systems apply these ideas. - Delta Sync Protocols · Mobile API Best Practices
Sync only what changed: change tokens, tombstones and resync. - Orchestrating Orders, Inventory & Payments · Payments & Money APIs
Outbox, sagas and timeouts across order, stock and payment services. - Sagas with Messaging · Queues & Background Processing in Depth
Coordinate multi-service transactions using events or commands. - Multi-AZ, Multi-Region and Failover · Resilience Patterns
Redundancy across failure domains and how failover really works. - Back-of-the-Envelope Estimation · System Design Interviews, Step by Step
Turn 'a lot of users' into requests per second, storage per year and bandwidth, with a handful of numbers worth memorising. Two minutes of arithmetic tells you whether one database is enough. - How to Run a System Design Interview · System Design Interviews, Step by Step
A six-step framework with a time budget: clarify, estimate, define the API and data, sketch the high-level design, go deep on two parts, and wrap up with trade-offs. Interviewers grade the process as much as the boxes. - Design a Chat App · System Design Interviews, Step by Step
One-to-one and group messaging with online presence and delivery receipts. The key ideas: persistent WebSocket connections, a per-conversation message order, and offline delivery through push notifications. - Design a News Feed · System Design Interviews, Step by Step
Show each user recent posts from the people they follow. The core decision is fan-out on write (precompute feeds) vs fan-out on read (build at request time), and the hybrid that handles celebrities. - Design a Rate Limiter · System Design Interviews, Step by Step
Limit each client to N requests per window across many servers. Compare fixed window, sliding window and token bucket, then make it distributed with Redis and decide what happens when the limiter itself fails. - Design a URL Shortener · System Design Interviews, Step by Step
The classic warm-up: turn long links into short codes and redirect fast. Covers code generation (counter + base62 vs hashing), a read-heavy cache design, and analytics without slowing redirects. - Design a Payment System · System Design Interviews, Step by Step
Take money from customers reliably: never charge twice, never lose a payment, and keep books that always balance. Idempotency keys, a payment state machine, a double-entry ledger and daily reconciliation.
Decision guides
- Choosing a Transaction Isolation Level
- Full Sync vs Delta Sync vs CRDTs
- Hash vs Range vs Directory Sharding
- Scaling Reads: Cache, Replicas or Read Models?
- Strong vs Eventual Consistency
- TTL vs Delete-on-Write vs Event-Driven Invalidation