Interview preparation
UNDERSTAND. EXPLAIN. REPEAT.

Question library

Explained questions for the decisions developers make.

Filters
660 questions

Cache, CDN, replica or shard: which solves what?

System design·Scaling & distributed systems

Caches, CDNs, replicas and shards address different kinds of repeated work or load. A cache reuses a result, a CDN brings cacheable content closer to users, a replica copies data, and a shard owns a subset of data. Combining them requires freshness, routing and recovery rules rather than simply adding more boxes.

Advanced2 min read

How does cache-aside work?

System design·Scaling & distributed systems

Cache-aside means the application manages when values enter and leave the cache. It first looks in the cache, loads missing data from the source of truth, then stores that result for later readers. This reduces repeated database work but creates a separate copy whose freshness must be controlled.

Advanced2 min read

What does CAP actually mean?

System design·Scaling & distributed systems

CAP describes a limit on distributed systems during a network partition. If nodes cannot communicate, the system cannot guarantee both a single up-to-date view of data and a successful response to every request to non-failing nodes. It must sometimes sacrifice availability or allow responses that may not satisfy that consistency guarantee.

Advanced2 min read

What is eventual consistency?

System design·Scaling & distributed systems

Eventual consistency allows copies or derived views to differ temporarily while updates propagate. If no new changes occur and processing succeeds, those views converge. This is useful when a delay is acceptable, but the product must define what users see during that delay and how failed propagation is repaired.

Advanced2 min read

Queue vs event vs worker?

System design·Messaging & reliability

A queue holds work waiting to be processed, a worker executes that work, and an event describes a fact that already happened. Commands request an action, while events can notify multiple interested consumers. Delivery and acknowledgement rules determine what happens when workers crash or messages are repeated.

Advanced2 min read

How do I design retries and dead-letter handling?

System design·Messaging & reliability

Retries repeat failed work in the hope that a temporary problem has passed. Backoff spreads attempts over time, jitter avoids synchronized retry bursts, and a dead-letter queue stores work that exceeded its retry policy. Without limits, retries can turn a small outage into sustained overload.

Advanced2 min read

What are idempotency and the outbox pattern?

System design·Messaging & reliability

Idempotency makes repeated requests for one logical operation produce one intended effect. The outbox pattern stores an event record in the same database transaction as the business change, allowing a later publisher to send it reliably. These solve related but different failure windows: duplicate work and losing the message between a commit and publication.

Advanced2 min read

How do I handle partial failure across services?

System design·Messaging & reliability

A cross-service workflow can partly succeed because each service commits independently. A saga coordinates local steps and compensating actions to recover when a later step fails. Compensation is a business recovery action, such as refunding a payment, and may not exactly erase every observable effect of the original action.

Advanced2 min read

How would you design a workflow automation platform?

System design·Design scenarios

A workflow platform stores a definition of steps and executes separate runs of that definition over time. Because runs can wait, retry or survive a restart, their progress must be durable rather than only held in a process. A queue and worker layer lets execution capacity grow separately from the request API.

Advanced2 min read

How would you design an HR integration platform?

System design·Design scenarios

An HR integration platform synchronizes employee-related data between systems that may use different IDs and update rules. Its main difficulty is deciding ownership and resolving partial, delayed or conflicting updates. Provider adapters keep vendor-specific authentication and data formats separate from the internal employee model.

Advanced2 min read

How would you design an investment analytics platform?

System design·Design scenarios

An analytics platform turns data from several sources into comparable reports and metrics. Ingestion, normalization and aggregation should be separate enough that a slow provider does not block every report request. Users need to know the source and freshness of a result, especially when one import is incomplete.

Advanced2 min read

How would you design a notification service?

System design·Design scenarios

A notification service accepts delivery requests and sends them through channels such as email, SMS or push. Queued delivery separates user-facing request speed from provider latency and limits. Durable status records allow retries, troubleshooting and reporting without assuming that provider acceptance means the user received the message.

Advanced2 min read

How would you design a URL shortener?

System design·Design scenarios

A URL shortener maps a compact public code to a destination URL and redirects visitors efficiently. Creation needs unique-code handling, while redirects usually dominate the read workload. Caching can speed up redirects, but expiry, abuse controls and private links influence the cache and access rules.

Advanced2 min read

How would you design a chat system?

System design·Design scenarios

A chat service delivers messages to connected users while preserving enough state for offline users and reconnects. Persistent storage provides history, and WebSockets provide timely delivery to active connections. Message IDs, ordering rules and acknowledgements let clients recover without displaying duplicates or losing unseen messages.

Advanced2 min read

How would you design a file processing system?

System design·Design scenarios

A file-processing service accepts an upload and transforms it asynchronously, such as extracting data or generating a report. Object storage holds the file, a durable job references it, and workers perform bounded processing. Keeping bytes out of the request server's memory improves stability for large uploads.

Advanced2 min read

How would you design an e-commerce platform?

System design·Design scenarios

An e-commerce system coordinates browsing, stock, orders and payments, which have different consistency needs. Catalog reads can often be cached, while stock reservation and order/payment transitions need stronger protection. External payments introduce uncertain outcomes that require durable state and reconciliation.

Advanced2 min read

How would you design a real-time dashboard?

System design·Design scenarios

A real-time dashboard presents frequently changing summaries without making each browser recalculate the whole dataset. An ingestion or aggregation layer builds the current view, and SSE or WebSockets deliver relevant updates. Clients still need an initial snapshot and a way to recover missed updates after disconnecting.

Advanced2 min read

How would you design an order-book-like matching system?

System design·Design scenarios

An order-book matching service accepts orders and matches eligible buyers and sellers according to explicit market rules. In a simple price/time model, price determines priority first and accepted sequence resolves equal-price competition. Correct ordering, durable records and deterministic recovery matter more than maximizing concurrency within one book.

Advanced2 min read

Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.