System Design Problems Archive
Filter 25 core interview problems across all chapters, difficulty levels, and top company tags with daily rotating Problem of the Day.
Solve today's problem before midnight IST to maintain your active streak.
Design a real-time digital advertising click aggregation and billing platform (like Google Ads or Meta Ads). The system processes 100,000 ad click events per second, filters click fraud and duplicate clicks within tumbling windows, aggregates metrics across advertiser campaigns with exactly-once processing semantics, and updates advertiser account balances accurately.
Design an enterprise-grade API Gateway and edge reverse proxy layer (inspired by Envoy Proxy and Kong). The gateway sits between public mobile/web clients and internal microservices, performing TLS termination, JWT validation, rate limiting, path-based routing, dynamic service discovery, and circuit breaking.
Design a global instant messaging service capable of supporting 500 Million daily active users (like WhatsApp or Telegram). The system must handle real-time 1-on-1 and group chats, deliver messages with sub-second latency via persistent WebSocket connections, display message delivery receipts (sent, delivered, read), and queue offline messages reliably.
Design a cross-platform cloud file storage and desktop synchronization system modeled after Dropbox or Google Drive. The system must synchronize files across desktop and mobile devices, support chunk-based file deduplication (4MB blocks), implement delta synchronization to upload only modified bytes, maintain revision history, and notify connected clients in real time when files change.
Design a real-time collaborative rich-text document editing system (modeled after Google Docs and Figma). The platform allows dozens of users to edit the same document concurrently with sub-50ms synchronization latency, displaying remote user cursors and resolving concurrent, conflicting text modifications seamlessly without data corruption or lost edits.
Design a distributed in-memory key-value caching system modeled after Redis and Memcached. The cache must support O(1) reads and writes, consistent hashing with virtual nodes to minimize rebalancing keys during node additions/failures, Least Recently Used (LRU) eviction under memory pressure, and probabilistic early expiration (XFetch) to prevent the thundering herd problem.
Design a distributed rate-limiting infrastructure for an API platform (inspired by Stripe and Cloudflare). The system must enforce flexible throttling rules (e.g., 100 requests per minute per IP, 5,000 requests per hour per API tier), evaluate decisions with sub-2ms latency, and function correctly during Redis cluster node failures and network partitions.
Design an enterprise distributed job scheduling and cron platform (modeled after Airbnb Chronos and Netflix Meson). The platform manages millions of recurring and one-off tasks with cron expressions or fixed intervals, guarantees at-least-once execution with zero missed schedules, supports dependency DAG workflows, and dynamically balances task execution across worker pools.
Design a high-concurrency inventory reservation and flash sale checkout counter (such as Amazon Prime Day or Nike SNKRS drops). During viral flash sales, 200,000 customers attempt to purchase 1,000 limited-edition items within 5 seconds. The system must guarantee zero overselling, enforce a 10-minute hold window for payment completion, and release abandoned stock back to the pool instantly.
Design an on-demand food delivery dispatch and order lifecycle engine (modeled after DoorDash and Uber Eats). The system coordinates an asynchronous three-party state machine between Customers, Restaurants, and Couriers, dynamically predicting kitchen preparation times, batching nearby orders for single couriers, and tracking real-time delivery status with sub-minute ETA accuracy.
Design a global real-time gaming leaderboard system for a competitive multiplayer battle royale game. The platform tracks 50 Million registered players, processes 25,000 score submissions per second, renders the top 100 global players instantaneously, and calculates any playerβs exact global and regional rank percentile in sub-20ms.
Design a high-performance distributed key-value storage engine modeled after Apache Cassandra, Google Bigtable, and RocksDB. The storage node must utilize a Log-Structured Merge (LSM) Tree architecture (Write-Ahead Log, in-memory MemTable, and immutable on-disk SSTables with Bloom filters) and coordinate cluster replication via Raft consensus or Dynamo quorum consistency.
Design a massive real-time sports scoreboard broadcast platform (such as ESPN Cricinfo or FIFA Live). During world cup championship matches, the system must stream ball-by-ball score updates, play commentary, and match statistics to 10 Million concurrent connected fans with sub-second propagation latency.
Design a high-throughput time-series metrics monitoring and alerting infrastructure (like Prometheus, Datadog, or InfluxDB). The platform collects billions of operational telemetry metrics (CPU, memory, request latency, custom counters) from 100,000 servers, compresses data using Gorilla time-series compression, evaluates alerting thresholds in real time, and powers sub-second dashboard visualizations.
Design a unified notification delivery platform capable of dispatching billions of push notifications, transactional emails, and SMS alerts across Apple APNs, Google FCM, Twilio SMS, and AWS SES. The system must honor user opt-out preferences, support priority scheduling, prevent spam storms, and ensure reliable delivery with dead-letter queue retry policies.
Design a distributed text paste sharing system similar to Pastebin or GitHub Gist. Users can upload plain text, code snippets, or configuration files up to 10MB, generate a shareable URL, specify optional syntax highlighting, and configure retention policies ranging from 10 minutes to indefinite storage.
Design an ultra-reliable payment processing gateway and financial double-entry bookkeeping ledger (modeled after Stripe and Adyen). The system processes credit card authorizations, refunds, and bank payouts, guarantees exactly-once financial charge execution with timing-safe idempotency guards, and reconciles settlement discrepancies across disparate banking networks.
Design a real-time ride-hailing dispatch and fleet matching platform modeled after Uber and Lyft. The system tracks 5 Million active drivers streaming GPS location pings every 4 seconds, indexes driver locations using geospatial hierarchical cell algorithms (Uber H3 or Google S2), and matches passenger ride requests with optimal nearby drivers within 2 seconds while computing dynamic surge pricing.
Design a high-concurrency stadium concert ticket booking and seat reservation platform (like Ticketmaster or BookMyShow). For high-demand mega-tours (e.g. Taylor Swift Eras Tour), 5 Million fans simultaneously storm the platform to reserve 80,000 available seats. The system must implement a virtual waiting room queue, guarantee zero double-booking of seats, enforce a 10-minute cart reservation hold, and handle traffic drops gracefully.
Design a high-scale social feed and timeline generation system like Twitter or Instagram. The system handles 300 Million daily active users who post 500 Million tweets per day, follow thousands of accounts, and expect their home timeline to render with sub-100ms latency, balancing the celebrity fan-out problem (accounts with 100M+ followers).
Design a lightning-fast search autocomplete and query suggestion engine like Google Typeahead or Amazon search suggestions. As users type character by character, return the top 5 to 10 most relevant search suggestions with sub-30ms P99 latency, ranked by historical query popularity and personalization signals.
Design a distributed 64-bit unique ID generation service modeled after Twitter Snowflake. IDs must be globally unique, roughly time-ordered (k-sortable), generate over 10,000 IDs per second per node with sub-millisecond response times, and survive NTP clock drift and leap seconds without producing duplicate identifiers.
Design a distributed URL shortener service like TinyURL or Bitly. The service must ingest long URLs, generate compact 7-character aliases using Base62 encoding, and handle high-throughput redirection with sub-10ms P99 latency while guarding against hash collisions and coordinate server failures.
Design a global video ingestion, transcoding, and streaming platform capable of delivering stutter-free 4K/1080p playback to millions of viewers (like YouTube or Netflix). The system must transcode uploaded master videos into multiple bitrates and codecs (HLS / MPEG-DASH), distribute chunks across global CDN edge caches, and adapt resolution dynamically based on viewer network conditions.
Design a scalable, highly respectful distributed web crawler capable of traversing and indexing 10 Billion web pages (inspired by Googlebot and Common Crawl). The crawler must parse HTML, extract links, discover new URLs, respect robots.txt politeness policies with per-domain rate limiting, detect spider traps, and eliminate duplicate content using 64-bit SimHash algorithms.