System design
System Design Interview Questions & Concepts
Real system design interview questions, each broken down into requirements, a high-level design that evolves stage by stage, the core components, trade-offs and scaling challenges. Every design is also a live architecture in PRISM, so you can run traffic through it and watch where it breaks.
System design interview questions
Start with the beginner questions if you are new to system design: they cover caching, read replicas and rate limiting on a small surface. Intermediate questions add fan-out, real-time delivery and data partitioning. Advanced questions combine several of these under tight latency, consistency or cost constraints.
Beginner (8)
- Design Library Management System Library management system: circulation with row-locked transactions, a catalog search index, read scaling for the semester rush, first-come hold lines with email notifications, and fines recorded on return. A teaching design. Beginner
- Design Notification System Multi-channel notification platform inspired by large companies' published designs: idempotent intake, preference- and template-aware routing with quiet hours and caps, per-channel queues with provider failover and dead letters, webhook-driven delivery tracking, and scheduled campaigns. A teaching design. Beginner
- Design Pastebin Paste-sharing service inspired by Pastebin and GitHub Gist: unguessable keys from a key generation service, text in object storage with key-value metadata, a read cache, a CDN for viral pastes, write limits and expiry cleanup. A teaching design. Beginner
- Design Semantic Product Search Search that understands meaning, not just keywords, inspired by Shopify and Etsy: product text turned into embeddings by background workers, a vector index searched by nearest neighbour and keyword together, and popular queries served from a cache. A teaching design. Beginner
- Design URL Shortener URL shortener inspired by Bitly and TinyURL: collision-free base62 codes from pre-allocated id ranges, a key-value link store with conditional writes, cache-first and edge redirects, async click analytics and malicious-link scanning. A teaching design. Beginner
- Design an AI Document Summarizer Upload a long document and get a summary, inspired by Notion AI and Adobe Acrobat's AI Assistant: files go to object storage, summaries are made in the background by splitting long documents into chunks, summarizing them in parallel and combining the results, and identical files are never summarized twice. A teaching design. Beginner
- Design an AI Translation Service Neural machine translation for text and documents, inspired by DeepL and Google Translate: stateless APIs in front of a batched GPU model fleet, a translation memory that reuses every sentence already translated, glossaries per customer, and whole documents translated in the background. A teaching design. Beginner
- Design an LLM API Gateway One API in front of many model providers, inspired by OpenRouter and Portkey: API keys checked from a cache, token usage metered in the background, requests routed to a healthy provider with automatic fallback, and per-key rate limits and budgets. A teaching design. Beginner
Intermediate (22)
- Design AI Photo Search (Google Photos) Search your own photos in plain words, inspired by Google Photos and Apple Photos: uploads go to object storage and a CDN, GPU workers label every new photo and turn it into an embedding, and searches like "dog on the beach 2019" are matched by meaning inside each user's private vector index. A teaching design. Intermediate
- Design API Gateway System API gateway platform inspired by Envoy/Kong-style gateways: local JWT validation with cached signing keys, a control plane pushing versioned routes, weighted canary routing, distributed token-bucket rate limiting, circuit breakers and async access logs. A teaching design. Intermediate
- Design Airbnb Home and hotel booking inspired by Airbnb and Booking.com: a search index of location, price and available nights kept current from change logs, nightly availability claimed in one transaction with a conditional update, holds that expire, idempotent payment, photos on a CDN, cached listing pages, and booking notifications. A teaching design. Intermediate
- Design Google Drive Cloud file storage and sync inspired by Google Drive and Dropbox: metadata separated from content, chunked resumable uploads deduplicated by content hash, a change journal with per-device cursors for sync, background scanning, previews and search, and versioning. A teaching design. Intermediate
- Design Live Sports Score System Real-time sports scores, built up in 4 stages: ingest official partner feeds in order and exactly once, serve 80K reads/s through a CDN and cache, push every goal to fans' screens in under a second over live connections, then harden with dead-letter retries, monitoring and multi-region failover — 22 components at the final stage, each stage sized for more than 2× headroom. A teaching design inspired by live-score services, not any one company's internal architecture. Intermediate
- Design Messaging App System Messaging with server-side history and multi-device sync, inspired by Facebook Messenger and Slack: persistent connections, per-conversation sequence numbers in a wide-column message store, fan-out to every device, catch-up from the last sequence number, unread counts, push and media. A teaching design. Intermediate
- Design Metrics Monitoring System Metrics monitoring system inspired by Prometheus and Facebook's Gorilla time-series database (VLDB 2015): buffered ingestion with cardinality limits, compressed time-series storage, cached dashboard queries, rule-based alerting, and downsampled cold storage. A teaching design. Intermediate
- Design News Feed Personalized home feed inspired by Facebook's and Twitter's published designs: fan-out on write into precomputed feeds, hybrid pull for high-follower accounts, ranking at read time, plus search and trending. A teaching design, not either company's internal architecture. Intermediate
- Design Online Dating Platform Dating app inspired by Tinder and Hinge: geohash-indexed discovery, a write-heavy swipe store with single-lookup mutual-like checks, matches created once per pair, precomputed ranked decks, chat only after a match, and photo moderation. A teaching design. Intermediate
- Design Quora Q&A platform inspired by Quora's published architecture: sharded MySQL content behind Memcached, CDN-cached pages for search visitors, duplicate-question suggestions, a ranked feed from followed topics and people, sharded vote counters and quality classification. A teaching design. Intermediate
- Design Rate Limiter System Distributed rate limiting service inspired by Envoy's global rate limit service and similar designs: central atomic counters in sharded Redis with sliding windows, leased local allowances for hot keys, fail-open behaviour, throttle analytics and cross-region count sync. A teaching design. Intermediate
- Design Real-time Quiz Platform Live quiz platform inspired by Kahoot: games routed by PIN to WebSocket gateways, one owner per game state machine, questions broadcast to all players at once, server-timestamped answers, and live leaderboards in Redis sorted sets. A teaching design. Intermediate
- Design Snapchat Ephemeral messaging and stories platform inspired by Snapchat: media in object storage behind a CDN, expiry that deletes content once opened, realtime chat with push for offline users, friend-graph privacy checks and 24-hour stories. A teaching design, not Snap's internal architecture. Intermediate
- Design Splitwise Shared expense tracker inspired by Splitwise: a ledger where expenses and net balances commit in one transaction, cached balances, debt simplification into the fewest payments, notifications, receipts and search. A teaching design. Intermediate
- Design Ticket Booking for Concerts Concert ticketing for flash on-sales, inspired by Ticketmaster and similar platforms: CDN event pages, atomic seat holds in memory, a virtual waiting room, background payment with hold expiry, and bot protection. A teaching design. Intermediate
- Design TikTok Short-video platform inspired by TikTok: async transcoding into adaptive-bitrate renditions, CDN playback with prefetch, a two-stage For You recommender (retrieval, then ranking) and near-real-time learning from engagement, as described in ByteDance's Monolith paper (2022). A teaching design, not ByteDance's internal architecture. Intermediate
- Design Twitter Production-grade Twitter/X architecture built progressively across 6 stages: durable tweet write path, social graph, hybrid push/pull home-timeline fanout, ranking and search, engagement/notifications/moderation, and ads plus analytics — 25 components at the final stage, every stage sized for >2× headroom at 300K rps across 3 AZs. A teaching design inspired by Twitter's published engineering, not its internal architecture. Intermediate
- Design a Real-time Gaming Leaderboard Real-time game leaderboard inspired by mobile games and fantasy-sports contests: scores saved with a conditional update, Redis sorted sets for O(log n) ranks, rankings updated from a queue for global, daily, weekly and regional boards, score-range sharding, a cached top 100, friends ranks and asynchronous anti-cheat. A teaching design. Intermediate
- Design a Speech-to-Text Transcription Service Meeting and lecture transcription, inspired by Otter.ai and OpenAI's Whisper API: audio uploaded to object storage, cut into chunks at silences and transcribed in parallel on GPU workers, stitched back together with speaker labels, and made searchable. A teaching design. Intermediate
- Design an AI Content Moderation System Layered moderation for a large community, inspired by Discord and Reddit: known-bad content matched by hash, a fast classifier that decides most posts in milliseconds, an LLM that reviews the uncertain ones against the written rules, and human moderators for the hardest cases and appeals. A teaching design. Intermediate
- Design an AI Customer Support Chatbot A support bot that answers from a company's help center, inspired by Intercom Fin and Zendesk AI: help articles split into passages and embedded in the background, answers grounded only in retrieved passages, common questions answered from a cache, and low-confidence conversations handed to a human with a summary. A teaching design. Intermediate
- Design an AI Image Generator (Midjourney) AI image generation inspired by Midjourney and DALL·E: prompts accepted as queued jobs, a fleet of GPU workers running diffusion, a fast lane for paid plans and a relaxed lane for free ones, live previews from a progress cache, images in object storage behind a CDN, a cached gallery, prompt moderation and image safety checks. A teaching design. Intermediate
Advanced (30)
- Design Ad Serving System Design an ad serving system that selects and delivers the most relevant ad for each impression within a strict latency budget. The system must manage campaign budgets, pacing, targeting, and attribution at scale. A teaching design inspired by real ad servers, not any one company's internal architecture. Advanced
- Design Collaborative Document Editing System Collaborative document editor inspired by Google Docs and Figma's multiplayer service: real-time multi-cursor editing with operational transformation, an operation log as the source of truth, presence, permissions and version history. A teaching design, not Google's or Figma's internal architecture. Advanced
- Design Distributed Cache System Distributed in-memory cache inspired by Memcached at Facebook (Scaling Memcache at Facebook, NSDI 2013) and Redis Cluster: look-aside caching, consistent hashing, replicas with failover, gutter pools, leases against stampedes and invalidation from the database's commit log. A teaching design. Advanced
- Design E-commerce Marketplace Online marketplace inspired by large retailers' published patterns: CDN-cached catalog, faceted search, durable carts, conditional inventory reservations, idempotent orders, and a payment saga driven by a transactional outbox. A teaching design. Advanced
- Design Food Delivery System Food delivery platform inspired by DoorDash, Uber Eats and Swiggy: geo-filtered restaurant discovery, idempotent orders with a state machine, restaurant tablet push, courier location tracking in a geo store, automatic dispatch, live ETAs and capture-on-delivery payments. A teaching design. Advanced
- Design Gmail Email service inspired by Gmail: a mailbox store partitioned by user, sending through a delivery queue with SMTP retries, attachments stored once in object storage, an inbox cache, a per-user search index fed from a mail event stream, spam filtering with SPF, DKIM, DMARC and a classifier, push sync over open connections, and daily send limits. A teaching design. Advanced
- Design Google Calendar Calendar service inspired by Google Calendar and the iCalendar/CalDAV standards: recurrence rules expanded per view window, invites and RSVPs, scheduled reminders, incremental sync with sync tokens, and free/busy scheduling. A teaching design. Advanced
- Design Google Maps Nearby Search Maps platform inspired by Google Maps' published techniques: pre-rendered vector tiles on a CDN, S2-cell geospatial search, live traffic from map-matched GPS pings, routing with contraction hierarchies, and historical-speed ETA prediction. A teaching design. Advanced
- Design Instagram Photo and video sharing platform inspired by Instagram's published engineering: stateless app servers, media in object storage behind a CDN, sharded Postgres with shard-encoded ids, precomputed feeds and async processing. A teaching design, not Meta's current internal architecture. Advanced
- Design Instamart Delivery System Quick-commerce grocery delivery inspired by Swiggy Instamart, Zepto and Blinkit: addresses mapped to dark stores, per-store catalogs and stock reservations, orders pushed to pickers in aisle order, riders waiting at the store, and capture-on-delivery payments. A teaching design. Advanced
- Design IoT Telemetry Ingestion System IoT telemetry platform inspired by AWS IoT Core and Azure IoT Hub: MQTT brokers with certificate authentication, a telemetry stream feeding time-series storage, device shadows, a rules engine for alerts, and downsampled cold archives. A teaching design. Advanced
- Design Payment Fraud Detection Real-time payment fraud detection inspired by Stripe Radar and similar systems: online velocity features, rules plus a gradient-boosted model scored in milliseconds, streaming feature updates, a label feedback loop for retraining, and analyst review for borderline cases. A teaching design. Advanced
- Design Payment Processing System Payment processing platform inspired by Stripe-style payment processors: payment intents with idempotency keys, a card vault that limits PCI scope, a double-entry ledger, signed webhooks, settlement reconciliation, chargebacks and processor failover. A teaching design. Advanced
- Design Real-time Analytics System Real-time analytics pipeline inspired by Kafka, Flink and Druid/Pinot architectures: durable replayable ingestion, a raw event lake, event-time windowed aggregation with exactly-once rollups, late-event handling, an OLAP store for ad-hoc queries and anomaly alerts. A teaching design. Advanced
- Design Retail Stock Brokerage Retail stock brokerage inspired by Robinhood-style brokers: orders validated against buying power and acknowledged immediately, routed asynchronously over FIX to market makers and exchanges, fills booked to a double-entry ledger, and live quotes streamed over WebSockets. A teaching design. Advanced
- Design Ride Sharing System Ride hailing inspired by Uber's published designs: driver pings into an in-memory H3 geo index, ETA-ranked dispatch with sequential offers and atomic assignment, per-cell surge pricing from the location stream, trip events for notifications and payments, and per-trip GPS history. A teaching design. Advanced
- Design Search Autocomplete System Search autocomplete inspired by large search engines' typeahead: a sharded trie of precomputed top completions rebuilt from aggregated query logs, edge caching of popular prefixes, real-time trending, personalized re-ranking and blocklist filtering. A teaching design. Advanced
- Design Social Media Social network inspired by Facebook's published designs: a TAO-style object and association graph in sharded MySQL behind tiered caches, privacy checks on every read, feeds assembled at read time from in-memory activity leaves and ranked, notifications, social search and integrity classifiers. A teaching design. Advanced
- Design Top-K Trending Topics Trending topics inspired by Twitter/X Trends and YouTube Trending: hashtag events on a partitioned stream, windowed counting with a count-min sketch and heavy-hitter heaps, trends ranked by velocity against a baseline, a precomputed top 50 per region in a cache, a replayable raw-event archive and bot filtering. A teaching design. Advanced
- Design UPI Payments (PhonePe / Google Pay) UPI payment app inspired by PhonePe and Google Pay on NPCI's UPI network: a transaction saved as pending under an idempotency key before money moves, switch calls from a queue with timeouts, status served from a cache, UPI ID name lookup, push and SMS notifications, daily reconciliation against NPCI settlement files, and pre-payment risk checks. A teaching design. Advanced
- Design Video Streaming Platform Video streaming platform inspired by Netflix's published engineering: chunked per-title encoding, playback manifests steering players to CDN servers inside ISPs, off-peak pre-positioning of popular titles, DRM licenses, and viewing history powering 'continue watching' and personalized rows. A teaching design. Advanced
- Design Web Crawler Web crawler in the style of the Mercator design used by search engines: a durable URL frontier, per-host politeness queues with robots.txt and DNS caches, distributed fetchers, Bloom-filter URL deduplication, SimHash content deduplication, and change-based recrawl scheduling. A teaching design. Advanced
- Design WhatsApp Mobile messaging platform inspired by WhatsApp: persistent connections, store-and-forward delivery (the server keeps messages only until they're delivered), push for offline phones, server-side group fan-out and Signal-protocol end-to-end encryption with encrypted media. A teaching design, not Meta's internal architecture. Advanced
- Design a Distributed Job Scheduler Distributed job scheduler inspired by Airflow, Kubernetes CronJobs and the distributed cron described in Google's SRE book: jobs saved with their next fire time, partitioned schedulers holding leases and firing from in-memory timer wheels, exactly-once claims with a conditional insert, an executor fleet behind a dispatch queue, heartbeats, retries with backoff, dead letters, and a run status cache. A teaching design. Advanced
- Design a RAG Document Q&A System Retrieval-augmented Q&A over company documents inspired by Perplexity, Notion AI and Glean: documents split into overlapping passages and embedded by workers, hybrid vector and keyword retrieval, cross-encoder re-ranking, answers grounded in cited passages, an answer cache keyed by meaning and document version, and access lists enforced inside retrieval. A teaching design. Advanced
- Design a Recommendation System (YouTube Home) Personalised home feed inspired by YouTube and Netflix: engagement events on a stream into a data lake, daily training that precomputes candidates, two-stage retrieve-then-rank with nearest-neighbour search and a ranking model, an online feature store updated in seconds, filters, variety and cold-start feeds, impression logging, and experiment groups. A teaching design. Advanced
- Design an AI Agent Platform Platform for long-running AI agents inspired by OpenAI's Assistants and Claude's agent tools: tasks accepted and queued, the agent loop in workers that save every step before the next, ownership through conditional updates and heartbeats so a crashed run resumes, step, token and time budgets, a tool gateway with per-task permissions, code in throwaway microVMs, approvals for risky actions, and live progress over open connections. A teaching design. Advanced
- Design an AI Code Assistant (GitHub Copilot) Inline AI code completion inspired by GitHub Copilot and Cursor: debounced requests, a gateway that cancels superseded requests, a small fast code model with continuous batching, repository context from an index of symbols and code snippets, a completion cache, routing between a fast and a larger model, and acceptance telemetry. A teaching design. Advanced
- Design an LLM Chat App (ChatGPT) AI chat assistant inspired by ChatGPT and Claude: a stateless chat API that streams replies token by token, a GPU pool with continuous batching, prefix-aware routing to reuse KV caches, a context cache, per-plan token quotas metered from a queue, prompt moderation, and a smaller model for overflow. A teaching design. Advanced
- Design an Online Judge (LeetCode) Online coding judge inspired by LeetCode and Codeforces: submissions saved and queued per language, untrusted code run in throwaway container sandboxes with no network and fixed limits, hidden test cases in object storage, verdicts polled from a cache, live contest rankings in a sorted set, and judges scaled ahead of contests. A teaching design. Advanced
Practise the way the interview works
Interviewers do not ask you to recite a design. They change a constraint and watch how you adapt. PRISM lets you do the same on your own: build, simulate a traffic spike, find the bottleneck, fix it.