System Design Templates
50 canonical system design interview scenarios, each broken down into the specific architectural components a correct solution needs. Pick one to see its full component breakdown, then open it in InfraDraft to build and simulate it.
Infrastructure Primitives
Design a Rate Limiter
Enforce per-client request quotas across a distributed fleet without a shared bottleneck, using an algorithm suited to the burst tolerance you need.
Design a Distributed Key-Value Store
A horizontally-scalable store in the spirit of DynamoDB or Cassandra, trading strict consistency for availability and partition tolerance via consistent hashing and quorum reads/writes.
Design a Distributed Cache (Redis clone)
An in-memory key-value cache cluster with sub-millisecond reads, sharded across nodes with configurable eviction and replication for durability.
Design a Message Queue (Kafka clone)
A durable, partitioned append-only log system decoupling producers from consumers with configurable retention and consumer-group semantics.
Design a Web Crawler
A distributed crawler that discovers, fetches, and indexes billions of pages while respecting robots.txt, avoiding duplicate work, and controlling politeness per host.
Design a URL Shortener (TinyURL)
A high-read-throughput redirect service mapping short codes to long URLs, with collision-free ID generation and edge-cached lookups.
Design a Distributed ID Generator (Snowflake)
A coordination-free service producing k-sortable, globally unique 64-bit IDs by combining timestamp, worker ID, and sequence bits.
Design a Distributed Search System (Elasticsearch clone)
A sharded, replicated inverted-index engine supporting full-text search, ranking, and near-real-time indexing at scale.
Design a Distributed Task Scheduler
A cron-like scheduler that reliably triggers and executes millions of delayed or recurring jobs exactly once across a worker fleet.
Social & Feed
Design Twitter / X (Focus on News Feed and Fan-out)
A social feed platform balancing fan-out-on-write (precomputed timelines) against fan-out-on-read (celebrity accounts) to deliver a fast, personalized timeline at scale.
Design Instagram (Focus on Photo Storage and CDN)
A photo-sharing platform optimized for write-once/read-many media delivery via multi-resolution transcoding and aggressive edge caching.
Design a Chat System (WhatsApp / Messenger - Focus on WebSockets)
A real-time messaging platform maintaining persistent WebSocket connections, guaranteeing message delivery order and offline sync.
Design Reddit / HackerNews (Upvoting, ranking algorithms, and tree-based comments)
A community discussion platform combining a time-decayed ranking algorithm for posts with a scalable tree-structured comment system.
Design Tinder (Geospatial matching and swipe queues)
A geospatial matching platform serving a personalized, location-filtered swipe queue and detecting mutual likes in real time.
Design Pinterest (Image rendering and board organization)
A visual discovery platform organizing user-curated image collections ("boards") with masonry-layout feed rendering and image similarity search.
Design Quora (Q&A with complex feed aggregation)
A Q&A platform aggregating topic-based content into a personalized feed, ranking answers by quality signals rather than just recency.
Media & Streaming
Design TikTok (Video processing and recommendation feed)
A short-video platform combining a heavy transcoding pipeline with a real-time, engagement-driven recommendation engine powering the "For You" feed.
Design Netflix / YouTube (Video streaming and transcoding)
A video-on-demand platform ingesting uploads through an adaptive-bitrate transcoding pipeline and serving playback via a global multi-tier CDN.
Geospatial
Design Uber / Lyft (Geospatial querying, matching systems)
A ride-hailing platform continuously ingesting driver GPS pings, indexing them geospatially, and matching riders to nearby drivers under tight latency budgets.
Design a Food Delivery App (DoorDash/UberEats state machine orchestration)
A three-sided marketplace orchestrating restaurant order state, real-time courier dispatch, and live delivery tracking as one state machine.
Design a Proximity Service (Yelp / Nearby Places)
A location-based discovery service returning ranked nearby points of interest within a radius, backed by a spatial index for fast range queries.
Design Google Maps (Navigation and ETA calculation)
A mapping platform combining a road-network graph with real-time traffic data to compute shortest-time routes and continuously-updated ETAs.
Design a Geohash/QuadTree Indexing Service
A reusable spatial-indexing primitive that encodes 2D coordinates for fast proximity range queries, used as a building block by location-aware services.
Design a Real-time Location Sharing Service (Life360)
A continuous location-broadcast platform streaming a user's position to a defined circle of contacts in near real time with geofence alerting.
Design a Foursquare-style Check-in System
A location-verification and social gamification platform that validates a user is physically near a venue before recording a check-in.
Design an Airport Flight Tracking System
A high-frequency ingestion system tracking thousands of concurrent aircraft positions (ADS-B) and rendering their live paths with minimal lag.
Data & Analytics
Design a Real-time Metrics Aggregation System (Datadog clone)
A high-cardinality time-series platform ingesting millions of metric points per second, rolling them up in real time, and serving low-latency dashboard queries.
Design an Ad Click Aggregator (High-throughput event stream)
A billing-critical pipeline that ingests massive click/impression event volume and produces exactly-once, deduplicated aggregate counts.
Design a Fraud Detection System (Real-time stream processing)
A low-latency stream-processing system scoring every transaction against behavioral and rule-based models before it completes.
Design a Log Storage and Search System (Splunk clone)
A high-ingest log platform indexing unstructured text at scale for fast full-text and structured field search, with tiered hot/cold retention.
Design a Recommendation Engine (Batch vs. Streaming pipelines)
A hybrid recommendation platform combining offline batch model training with a low-latency online serving path for real-time personalization.
Fintech & Commerce
Design a Financial Ledger System (Double-entry accounting scale)
An immutable, append-only double-entry ledger guaranteeing every balance is reconstructible and every transaction is atomically balanced.
Design Amazon (Cart and Checkout systems)
An e-commerce cart and checkout flow coordinating inventory reservation, pricing, and payment as a single reliable distributed transaction.
Design a Flash Sale System (High concurrency, preventing overselling)
A short-burst, extreme-concurrency purchase system that prevents overselling limited inventory under massive simultaneous demand.
Design a Payment Gateway (Stripe clone, strict idempotency focus)
A payment processing gateway routing transactions to card networks and banks while guaranteeing exactly-once charge semantics via strict idempotency.
Design a Digital Wallet (Venmo/CashApp)
A peer-to-peer balance-transfer platform requiring strongly-consistent balance updates and a social activity feed layered on top.
Design an E-commerce Inventory Management System
A multi-warehouse inventory system tracking real-time stock levels, reservations, and replenishment across many sellers and fulfillment centers.
Booking & Marketplace
Design a Hotel Booking System (Handling overlapping constraints)
A booking platform preventing double-booking of room-date inventory under high concurrency, with date-range overlap checks at its core.
Design a Movie Ticket Booking System (BookMyShow, seat locking)
A seat-level booking system that temporarily locks individual seats during checkout to prevent two users from buying the same seat.
Productivity & Collaboration
Design Google Docs (Operational Transformation / CRDTs)
A real-time collaborative editor merging concurrent edits from many clients without conflicts using OT or CRDT-based synchronization.
Design Slack / Discord (Group chats, presence, and channels)
A multi-channel team communication platform managing persistent WebSocket fan-out across large, dynamically-membered channels and servers.
Design Google Drive / Dropbox (Block-level file syncing)
A file-sync platform that splits files into content-addressed blocks so only changed chunks are re-uploaded and synced across devices.
Design Zoom (Video conferencing and WebRTC orchestration)
A real-time video conferencing platform orchestrating WebRTC peer sessions through SFU media servers to scale beyond mesh topologies.
Design an Enterprise Email System (Gmail clone)
A high-volume mail platform handling SMTP ingestion, spam filtering, and full-text search across mailboxes at massive per-user storage scale.
Design a Task Management System (Jira / Trello)
A project-tracking platform modeling boards, tickets, and configurable workflows with real-time updates across collaborating team members.
Platform & Infra Services
Design an Object Storage System (Amazon S3)
A massively durable, horizontally-scalable blob store providing simple PUT/GET semantics over a distributed, erasure-coded storage layer.
Design an API Gateway
A single entry point fronting a microservice fleet, handling routing, auth, rate limiting, and observability so individual services don't have to.
Design a Cloud Metrics Dashboard (CloudWatch)
An observability platform collecting infrastructure and application metrics/logs at scale, and rendering configurable alerting dashboards.
Design a Content Delivery Network (CDN)
A globally-distributed edge caching layer that serves static and dynamic content from points of presence near the end user to minimize latency.
Design a Serverless Compute Platform (AWS Lambda clone)
An event-driven, pay-per-invocation compute platform that provisions isolated execution sandboxes on demand and scales to zero.