# system design

// [59] real interview questions. Answers and sources live in the practice app.

practice this topic
  1. Design a URL shortener like Bit.ly or TinyURL.(mid)
  2. Design Pastebin — a service where users paste text and get a shareable link.(mid)
  3. Design the Twitter timeline and search (or Facebook feed and search).(senior)
  4. Design a scalable web crawler.(senior)
  5. Design Mint.com — a personal finance service that aggregates users' bank accounts and categorizes transactions.(mid)
  6. Design the data structures for a social network and support a shortest-path friend search.(mid)
  7. Design a key-value cache to save the results of the most recent web-server queries for a search engine.(mid)
  8. Design Amazon's sales-rank-by-category feature.(mid)
  9. Design a system on AWS that scales from one user to millions of users. Walk through the evolution.(mid)
  10. Design a file sync service like Dropbox.(senior)
  11. Design Google Docs — real-time collaborative document editing.(senior)
  12. Design an in-memory key-value store like Redis.(mid)
  13. Design a distributed cache system like Memcached.(senior)
  14. Design a recommendation system like Amazon's 'customers also bought'.(senior)
  15. Design a chat application like WhatsApp.(senior)
  16. Design a picture-sharing system like Instagram.(mid)
  17. Design the Facebook news feed.(senior)
  18. Design the Facebook timeline (a user's own profile history).(mid)
  19. Design Facebook chat, including presence (online/offline indicators).(senior)
  20. Design a graph search function like Facebook's ('friends of mine who live in Ankara and like hiking').(senior)
  21. Design a content delivery network (CDN).(senior)
  22. Design a trending topics system like Twitter's.(senior)
  23. Design a distributed unique ID generation system (random ID / Snowflake-style).(mid)
  24. Return the top k requests (or search terms) during a past time interval.(senior)
  25. Design a system that serves data from multiple datacenters.(senior)
  26. Design an online multiplayer card game.(mid)
  27. Design an API rate limiter.(senior)
  28. Design a stock exchange like NASDAQ or Binance.(senior)
  29. Design a search engine like Google (crawl, index, serve).(senior)
  30. Design Uber — ride matching between riders and nearby drivers.(senior)
  31. Design Netflix — video upload, transcoding, and streaming at scale.(senior)
  32. Design a least recently used (LRU) cache. How do you get O(1) for both get and put?(junior)
  33. Design a metrics and monitoring pipeline (Prometheus/Datadog-style) that collects, stores, and alerts on metrics from 10,000 hosts.(senior)
  34. Design search autocomplete (typeahead) — return suggestions within ~100ms of every keystroke.(senior)
  35. Design a distributed cron / job scheduler service — thousands of scheduled jobs, no missed or double runs, surviving machine failures.(senior)
  36. Design a webhook delivery system — notify customers' HTTPS endpoints about events, the way Stripe does.(senior)
  37. Design a feature flag system used by hundreds of services — flags evaluated on every request without adding latency.(senior)
  38. Design the ledger for a payment system — every balance must be explainable and money must never be created or destroyed.(senior)
  39. Design tenant isolation for a multi-tenant B2B SaaS — keep tenants' data and performance isolated without running one stack per customer.(senior)
  40. Design a centralized logging pipeline (ELK-style) — collect, index, and search logs from thousands of service instances.(senior)
  41. Design a distributed tracing system (Dapper/Jaeger-style) for a microservices fleet.(senior)
  42. You added a new derived field that needs values computed for 5 billion existing rows. Design the backfill without hurting production.(senior)
  43. Alter a 2TB hot MySQL table — add a column and an index — with zero downtime. How?(senior)
  44. Your platform serves thousands of customers from one shared stack, and every incident hits everyone. Design a cell-based architecture to shrink the blast radius.(senior)
  45. Your product is given an RPO of 5 minutes and an RTO of 1 hour. Design the disaster recovery strategy that actually meets them.(senior)
  46. A client calls 'charge the customer $50', times out, and retries. Design idempotent POST endpoints so the customer is never double-charged.(senior)
  47. Design a distributed event streaming platform like Kafka.(senior)
  48. What does an API gateway do, what should NOT go in it, and when do you need Backends for Frontends (BFF)?(mid)
  49. You must break a 10-year-old monolith into services without freezing feature work for a rewrite. Walk through the strangler fig approach.(senior)
  50. Design a 'find places near me' service (Yelp-style proximity search).(senior)
  51. Design a distributed file system like GFS/HDFS for very large files and streaming reads.(senior)
  52. Blue-green vs canary vs rolling deployments — how do you ship with zero downtime, and what does each strategy cost?(mid)
  53. When you buy a concert ticket, the app 'holds' your seat for 10 minutes while you pay — and nobody else can grab it. Design the seat-reservation flow so two people can never buy the same seat.(senior)
  54. A viral video shows '2.4M views', but you refreshed it three times and hit replay twice — yet the count didn't jump by five. How does a platform count views at massive scale without double-counting?(senior)
  55. You order food and watch the courier's scooter icon crawl toward your house on a live map. How does the app stream a moving courier's location to you in real time — and find the nearest couriers to an order — without melting under millions of GPS pings?(mid)
  56. On a rainy Friday night the same ride suddenly costs 2.3x. Design the surge / dynamic pricing engine that produces that multiplier per neighborhood, in near-real time.(senior)
  57. A flash sale drops 500 units at midnight and 50,000 people tap 'buy' in the same second. How do you guarantee you sell exactly 500 and never oversell to the 501st person?(senior)
  58. Your phone is locked in your pocket and an app you haven't opened all day still buzzes with a notification. How does a server 'push' to a phone it isn't connected to — and why can't the app's backend talk to the device directly?(mid)
  59. You download a playlist on Spotify before a flight and it plays fine in airplane mode — but after a few weeks offline it stops working until you reconnect. Design offline downloads for a music app.(mid)