Skip to the page

Design rounds · 24 concepts

Backend system design

How to run a backend system design round: requirements and estimates, the building blocks, microservices and APIs, India-scale prompts and reliability.

Part 1 · 2 concepts

Running the round

  1. 01

    How to run a system design round

    Run the round in order: requirements, estimates, API, data model, high-level design, deep dives, then trade-offs. Say your assumptions out loud and let numbers change…

  2. 02

    Back-of-the-envelope estimation

    Estimate with round numbers: users, actions, seconds in a day, size per item and a peak factor. The result must tell you if one machine, a cache or a CDN is needed.

Part 2 · 7 concepts

Design building blocks

  1. 03

    Load balancers: layer 4 and layer 7

    A layer 4 balancer routes connections by address and port and is fast. A layer 7 balancer reads HTTP, so it can route by path, end TLS and retry. The algorithm and the…

  2. 04

    Caching strategies and cache failures

    Use cache-aside by default: read the cache, fill on a miss, delete on update. Know write-through and write-back, TTL, the update race, and the herd after a cache restart.

  3. 05

    What to serve from a CDN

    A CDN keeps copies at edge servers near users. Serve static and public content from it, never personal content, and use versioned file names instead of purges.

  4. 06

    Message queue or Kafka

    A queue gives each message to one consumer and removes it after the ack. A log such as Kafka keeps ordered events that many consumer groups read and replay. Pick by who…

  5. 07

    Kafka partitions, consumer groups and lag

    A topic is split into partitions. Inside a group each partition is read by one consumer, so parallelism equals the partition count. Lag grows when consumers are too…

  6. 08

    SQL or NoSQL, and choosing a shard key

    Choose the store by access pattern, consistency need, scale and team skills. Scale SQL step by step before sharding, and when you shard, choose a key that matches the…

  7. 09

    Consistency, replica lag and CAP

    Replicas are usually asynchronous, so a read right after a write can be old. Choose the consistency model per feature. CAP and PACELC say what you give up in a split…

Part 3 · 4 concepts

Microservices and APIs

  1. 10

    Monolith or microservices, and how to split

    Start with a modular monolith. Split into services only when teams or scaling need it, along business capabilities, with each service owning its data, using the…

  2. 11

    REST API design, gRPC and API versions

    Design resources and status codes clearly, make POST safe to retry with an idempotency key, use cursor pagination, pick gRPC inside and REST outside, and change APIs by…

  3. 12

    The API gateway layer

    A gateway handles cross-cutting jobs such as routing, authentication and rate limits. It never holds business rules. A backend-for-frontend composes data for one client…

  4. 13

    Sagas, the outbox and async checkout

    Across services use a saga of local transactions with compensations, not two-phase commit. Publish events through a transactional outbox. Keep only what the user must…

Part 4 · 3 concepts

System design prompts

  1. 14

    URL shortener, rate limiter and search suggestions

    Three classic read-heavy prompts: a URL shortener, a distributed rate limiter and typeahead search. Each is solved with a few numbers, a cache and one careful hot spot.

  2. 15

    Chat app, news feed and file storage

    Three big prompts with a common shape: split the fast path from the heavy path, partition by the right key, and make retries safe. They are chat, a social feed and…

  3. 16

    Notification service and job scheduler

    Both are queue-based systems: accept work, store it, run it later with retries. The key ideas are priority separation, claiming work safely, at-least-once delivery and…

Part 5 · 4 concepts

India-scale design

  1. 17

    UPI payments, failed debits and a stock broker

    Money systems never guess. Use idempotency keys, forward-only states, a double-entry ledger and reconciliation. A timeout is an unknown result, and the user must never…

  2. 18

    Tatkal booking, flash sale and oversold stock

    Burst events need three things: a waiting room to control entry, one atomic place for stock, and a hold with an expiry. Everything else is cached, degraded or switched…

  3. 19

    Live order tracking and ride hailing

    Location data is high-rate, low-value writes. Keep it in memory in a spatial index, stream it, and send only what each screen needs. Matching must claim a driver…

  4. 20

    OTP service at scale

    An OTP service is a secure code store plus a fast, separate delivery path with provider routing. Abuse limits and delivery measurement matter as much as the code itself.

Part 6 · 4 concepts

Reliability and scale

  1. 21

    Availability, SLOs, monitoring and latency

    Availability is measured as the success rate of real requests. Set SLOs, alert on burn rate, watch percentiles not averages, and trace requests across services.

  2. 22

    Database failover, backups and multiple regions

    Failover needs a fenced old primary and a stable connection path. Backups protect against bad writes that replicas copy. RPO and RTO set the design, and regions add a…

  3. 23

    Retry storms, partner floods and graceful degradation

    Overload spreads when callers retry, share pools or wait on optional services. Use limits per client, bulkheads, bounded queues, retry budgets, circuit breakers and…

  4. 24

    Preparing for 10x traffic and changing huge tables

    Readiness is measured load tests, pre-scaling and an agreed degradation plan. Schema changes on big tables use expand, backfill in throttled batches, then contract.

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview