Interview Q&A: Advanced

Harder system design interview questions with real model answers: designs that combine several patterns at once, carry sharper correctness requirements, or come up less often but separate strong candidates when they do.

On the roadmap:Interview Ready · step 7: Practise under pressure

Lesson 5 of 7 · 50 min read · quiz · exercise

How to use this lesson

These combine several patterns at once, carry sharper correctness requirements, or cover systems that come up less often but separate strong candidates when they do. If a question here feels unfamiliar, the Intermediate lesson almost certainly covers the pattern it's built on.

When would I reach for a saga instead of a normal database transaction?

When an operation spans multiple services, each with its own database, so a single ACID transaction across all of them isn't available. A saga breaks the operation into a sequence of local transactions, each with a defined compensating action to undo it if a later step fails — so you get eventual consistency across services instead of one atomic cross-service transaction.

When do I need an event log or event sourcing instead of just storing current state?

When you need a full history or audit trail of how something got to its current state, not just the current state itself — financial ledgers, inventory changes, anything that might need to be replayed or reconstructed. The cost is complexity: you're storing and reasoning about a stream of events instead of a simple row.

Design a global rate limiter across regions

See the "numbers and trade-offs" section above for the full reasoning — the short version for this design prompt: keep per-region local counters for speed, and periodically sync aggregate usage across regions, accepting a bounded amount of over-admission during the sync window rather than paying for synchronous global coordination on every request.

Design usage metering and billing per customer

Core challenge: every billable action must be counted exactly once, even across retries and service restarts. Design: emit a billing event for each action to a durable queue (not a direct database write from the hot path, which would slow down the user-facing request), with an idempotency key per event so a redelivered message doesn't get double-counted. Aggregation: a separate consumer aggregates events into per-customer totals, often in a time-series or wide-column store suited to high write volume. Reconciliation: run periodic reconciliation jobs comparing raw event counts to aggregated totals to catch any drift — billing is one domain where you want a belt-and-suspenders check even with idempotency in place.

Design a system to detect and block abusive traffic

Signals: request rate per IP/account, failed-login patterns, known bad IP ranges, behavioral anomalies (a bot clicking through a flow too fast or too mechanically to be human). Design: a layered approach — a fast, cheap first pass (rate limiting, IP reputation lists) catches obvious abuse immediately; a slower, more expensive second pass (anomaly detection, possibly ML-based) runs asynchronously and can retroactively flag or block accounts. False positives: this is the real design tension — too aggressive and you block real users, too lax and abuse gets through. A common mitigation is a graduated response (challenge with a CAPTCHA before an outright block) rather than binary allow/deny.

Design live score updates for a sporting event

Core requirement: push updates to potentially millions of concurrently watching clients with low latency, for a relatively low volume of actual score-change events. Design: this is a fan-out problem similar to a very large group chat — a WebSocket (or server-sent events) connection per client, with updates pushed from a single source of truth through a pub/sub layer to all connected gateway servers, each of which forwards to its own connected clients. Scale point: because the write rate is low (score changes are infrequent) but the read/connection count is enormous, the bottleneck is connection count and fan-out breadth, not write throughput — which changes where you'd focus optimization compared to, say, a chat app.

Design a video conferencing service

Core challenge: real-time audio/video with tight latency requirements, which is a different problem from most of the request/response designs above. Media routing: for small calls, peer-to-peer connections (WebRTC) can work directly between participants; beyond a handful of participants, a Selective Forwarding Unit (SFU) in the middle routes streams between participants without decoding/re-encoding them (cheaper than a full mixing server, more scalable than full mesh peer-to-peer). Signalling: a separate, more traditional server handles call setup, participant lists, and connection negotiation — the signalling path and the media path are usually architecturally separate. Scaling rooms: large rooms (webinars) often shift from SFU to a mixing/broadcast model since not everyone needs to receive everyone else's full-quality stream.

Design a collaborative whiteboard or document editor (like Google Docs)

Core challenge: multiple people editing the same content concurrently without their changes clobbering each other. The two standard approaches: Operational Transformation (OT — transforms each operation against concurrent operations so they can be applied in any order and converge to the same result; what Google Docs historically used) and Conflict-free Replicated Data Types (CRDTs — data structures mathematically designed so concurrent updates always merge consistently without needing a transform step; increasingly common in newer collaborative tools). Naming both and the trade-off (OT is harder to implement correctly but was established first; CRDTs are more composable but can have higher memory overhead) is usually enough depth unless the interviewer wants you to go further into one.

Design a delivery route planner (multi-stop optimization)

Core problem: given a set of delivery stops, find an efficient route — this is a variant of the Travelling Salesman Problem, which is computationally expensive to solve exactly at any real scale. Practical approach: use a heuristic (nearest-neighbor as a starting point, then local optimization like 2-opt swaps to improve it) rather than an exact solver, since a good-enough route computed in milliseconds beats an optimal route computed in hours. Batching: routes are often recomputed in batches (for example, every few minutes as new orders arrive) rather than recalculated instantly on every single new stop, to avoid constant route churn for drivers already en route.

Design a live-streaming platform

Core difference from on-demand video: latency matters a lot more — viewers are watching something happening now, so multi-second delays between capture and playback are noticeable and sometimes unacceptable (live sports chat reacting to a goal before the stream shows it is a real problem). Ingest: the broadcaster's stream is ingested and transcoded in near-real-time rather than as a background job, trading some efficiency for lower latency. Fan-out: the same CDN-based distribution as on-demand video applies once the stream is being actively served, but the "just transcoded, ready to serve" pipeline has to run continuously rather than once per upload.

Design a cross-border money transfer system

Builds on the payment design above, with foreign exchange and compliance as the added complexity. FX: the transfer amount needs to be converted at a rate that's either locked at initiation or at settlement (a design decision with real business trade-offs — locking early protects the sender from rate movement but exposes you to it instead). Compliance: transfers typically need to pass through checks (sanctions lists, anti-money-laundering rules) before completing, which adds an asynchronous verification step into what would otherwise be a simpler flow. Settlement: actually moving money between banks in different countries often goes through intermediary systems (correspondent banking networks), which is why cross-border transfers are frequently slower than same-country ones even when your own system processes the request instantly.

Design a stock exchange or order-matching engine

Core requirement: extremely low, deterministic latency, and perfect correctness in order sequencing — unlike most systems in this list, "eventually consistent" is never acceptable here. Design: the order book is typically held in memory on a single machine (or a small, tightly coordinated set) rather than distributed across a cluster, specifically to avoid the latency and non-determinism that distribution would introduce into matching. Determinism: orders must be processed in a strict, repeatable sequence so the same input always produces the same matches — this is why this is one of the few systems design problems where you'd actively argue against horizontal scaling as the first instinct, and explain why.

Design a subscription billing system

Core challenge: recurring charges that must fire reliably on schedule, handle failed payments gracefully, and prorate correctly when a plan changes mid-cycle. Design: a scheduled job (or a distributed job scheduler, see below) triggers billing attempts at each subscription's renewal date; a failed charge triggers a retry schedule (often with increasing delays) before the subscription is marked past-due or cancelled. Proration: when a user upgrades or downgrades mid-cycle, calculate the prorated difference based on time remaining in the current period — a frequent source of billing-support tickets if done inconsistently, worth naming as a real-world gotcha.

Design a fraud detection service

Core requirement: score transactions for fraud risk fast enough to not add noticeable latency to checkout, using signals that often only become available in a stream. Design: a fast, synchronous first pass using simple rules and a lightweight model scores the transaction inline; a slower, more thorough asynchronous pass (potentially using a heavier ML model trained on historical fraud patterns) can flag a transaction after the fact for review or trigger a hold. Feature pipeline: fraud signals (transaction velocity, device fingerprint, location mismatch) are often computed from a streaming pipeline that maintains rolling aggregates per user, rather than recomputed from scratch on each transaction.

Design a hotel or seat booking system

Core problem: the same core concurrency challenge as the flash sale/inventory designs — many people may try to book the same room or seat at the same time, and exactly one should succeed. Design: a short-lived hold (similar to the flash sale reservation) when a user starts checkout, with an atomic, conditional update for the final booking confirmation so two concurrent attempts can't both succeed for the same slot. Search versus booking consistency: search results (showing available rooms) can tolerate being very slightly stale — the actual booking confirmation cannot, which is a useful distinction to draw out loud since it lets you apply caching aggressively to search while keeping the booking path strict.

Design a distributed lock service

Core problem: let multiple processes coordinate access to a shared resource, with a lock that's held by exactly one process at a time even across machines. Design: backed by a consensus-based store (like one built on Raft, such as etcd or ZooKeeper) so the lock's state is agreed upon even if some nodes fail. Leases, not permanent locks: a lock is granted with a time-bound lease, not held forever — if the process holding it crashes without releasing it, the lease expires and another process can acquire it, rather than deadlocking the resource forever. Fencing: a classic failure mode is a process that thinks it still holds the lock (its lease expired, but it didn't notice, perhaps due to a long GC pause) continuing to act as if it does; a fencing token (a monotonically increasing number issued with each lock grant) lets downstream systems reject stale, out-of-order operations from a process that's lost its lock.

Design an email delivery service

Core challenge: reliably deliver email at scale while protecting your sending reputation, since major email providers will silently drop or spam-folder mail from senders with a poor reputation. Design: emails are queued and sent through a pool of sending infrastructure, with careful rate limiting per receiving domain (sending too fast to one provider can trigger reputation damage even if the content is fine). Bounces: hard bounces (invalid address) should remove that address from future sends automatically; soft bounces (temporary failure) get retried with backoff. This shares its queue-and-retry shape with the general notification design above — the differentiating complexity here is specifically reputation management and deliverability, which is worth naming explicitly as the hard part of this particular prompt.

Design a system for serving ML model predictions at scale

Core tension: the model itself may be too slow for a real-time request if called naively, so most of the design is about hiding that latency. Techniques: batching multiple requests together before running them through the model (better hardware utilization, at the cost of added latency waiting for a batch to fill), caching predictions for inputs that recur, and pre-computing predictions offline for cases where the input space is small and known in advance (user recommendations, as above). Model versioning: serving infrastructure needs to support rolling out a new model version gradually (similar to a canary deployment) so a bad model can be caught before it affects all traffic.

Design a data pipeline for clickstream events

Core flow: every user interaction on a site or app is emitted as an event, ingested through a high-throughput message broker (Kafka is the canonical choice here, given the sustained write volume), and eventually lands in both a fast-access layer (for near-real-time use, like the analytics dashboard above) and a durable, queryable warehouse (for later batch analysis). Why both: real-time use cases need low latency and can tolerate approximation; downstream analytics and reporting need completeness and exactness, which is why most pipelines fan the same event stream out to two different destinations rather than trying to serve both needs from one store.

Design an AI coding assistant (at a system level, not a model level)

Core components beyond the model itself: context building (gathering the relevant surrounding code, open files, and project structure to send along with the user's prompt — getting this right matters more to answer quality than most people expect), latency (code suggestions need to feel instant, so caching recent context and streaming partial responses as they're generated both matter), and privacy (code is often sensitive, so what gets sent to a model, what gets logged, and what a customer can opt out of are real design constraints, not just compliance checkboxes). Where the interesting design work is: this question is less about inference infrastructure (which is largely the "serving ML predictions" answer above) and more about the context pipeline and the privacy/data-handling boundary around it.

Keep sharpening this after the course

Reading real engineering write-ups keeps your answers grounded in what companies actually did and why, not just the textbook version of a design. When you read one, ask what problem forced the change, what the numbers were, what they rejected, and what went wrong before it worked — that's where the actual learning is, not in the final architecture diagram. A good weekly habit while preparing: read one or two engineering posts, then redraw the design from memory and explain it out loud, since retrieval and explanation turn recognition into recall far better than re-reading does.

Check your understanding

Question 1 of 3

0 correct so far

When would you reach for a saga instead of a normal database transaction?

Go deeper

  • Designing Data-Intensive Applications by Martin Kleppmann: the deepest treatment of the consistency and consensus ideas behind these questions
  • System Design Interview, volumes 1 and 2 by Alex Xu: the same question style at book length, with worked diagrams
  • systemdesign.io by systemdesign.io: another free resource covering common system design interview questions

© 2026 forcsguy.com. Original lesson text and diagrams. Books and sites linked above belong to their authors.