System Design

Interview problems, graded by the simulator

Each challenge gives you requirements and a starting point. Estimate the load, build the design, and keep going until every check passes — load, failures, availability and the classic follow-ups.

  1. Warm-up

    Survive a flash sale

    Your shop runs on one app server and one database. Marketing just announced a flash sale: expect about 2,400 requests/s at peak, and the email provider is known to slow down under load. Make it survive.

    Starts from 6 components, graded by 6 checks

    scalingcachequeuecdn

  2. Warm-up

    URL shortener

    Design a URL shortener: create short links and redirect at very high read volume. Every click must be counted for analytics.

    Starts from 2 components, graded by 6 checks

    read-heavycachenosql

  3. Medium

    Rate limiter

    A few heavy clients are hammering your public API. Add rate limiting that still holds when the API runs on many instances.

    Starts from 4 components, graded by 4 checks

    rate-limitingredisedge

  4. Medium

    Chat

    Design 1:1 chat: messages delivered in real time, history after reconnecting, presence, and push notifications for offline users.

    Starts from 5 components, graded by 5 checks

    realtimepubsubwebsockets

  5. Medium

    News feed

    Users post updates (sometimes with images) and read a personalised feed that must load fast.

    Starts from 5 components, graded by 5 checks

    fan-outcachecdn

  6. Medium

    Notification system

    Other teams call your service to notify users by email, SMS or push. Providers are flaky. One slow channel must not hold up the others — or the callers.

    Starts from 6 components, graded by 7 checks

    queuespubsubidempotencyresilience

  7. Medium

    Photo uploads

    Users upload ~5 MB photos from their phones and browse albums of thumbnails. Uploads must not tie up your servers.

    Starts from 6 components, graded by 5 checks

    object-storagepresignedeventscdn

  8. Hard

    Payments

    Build the payment path for a marketplace. Never charge twice, never let a slow payment provider take the site down, and keep taking payments through an AZ outage.

    Starts from 6 components, graded by 7 checks

    idempotencyresiliencemulti-az

The interview, step by step

  1. 1 · RequirementsFunctional (what it does) and non-functional (scale, latency, availability, consistency). Ask; don’t assume.
  2. 2 · EstimatesUsers → QPS (average and peak), read/write ratio, storage per year, bandwidth.
  3. 3 · API + data modelThe main endpoints and the entities they touch.
  4. 4 · High-level designBoxes and arrows for the main flows. Start simple.
  5. 5 · Deep divesThe hardest parts: hot paths, consistency, the data store, failure handling.
  6. 6 · Bottlenecks & trade-offsWhat breaks first at 10×, what you’d monitor, what you traded away.