call(back)

Problems

Callback's own problems and the LeetCode questions companies have been asking, in one place — pick a category, then filter by company, frequency, status, difficulty, topic, and language.

Design a Rate Limiter

System Design · Token bucket, sliding window, and where the counters live.

mediumSign in to star problems

Design a URL Shortener

System Design · The classic: encoding, storage, and redirects at scale.

mediumSign in to star problems

Design a News Feed

System Design · Fan-out on write vs. read, ranking, and the celebrity problem.

hardSign in to star problems

Design Pinterest's Home Feed

System Design · Recsys serving, not a social timeline — retrieval funnels, session state, four nines.

hardSign in to star problems

Design a Notification System

System Design · Fan-out, viral-pin aggregation under skew, and deciding not to send.

hardSign in to star problems

Design Search Typeahead

System Design · Tries with precomputed top-k, prefix sharding, and freshness by atomic swap.

mediumSign in to star problems

Design an Ads Event Reporting System

System Design · Streaming for dashboards, batch for billing truth — and hot keys from viral ads.

hardSign in to star problems

Design a Merchant Catalog Update Pipeline

System Design · Idempotent bulk ingestion with per-item ordering, fairness, and safe deletions.

mediumSign in to star problems

Design Image Upload and Serving for Pins

System Design · Presigned uploads, content-addressed variants, and a CDN that caches forever.

mediumSign in to star problems

Design the Pins and Boards Data Model

System Design · Sharding a relational model: object tables, mapping tables, no cross-shard joins.

mediumSign in to star problems

Design Visual Search

System Design · Embeddings, sharded ANN retrieval, and fresh pins searchable in seconds.

hardSign in to star problems

Design a Blob Storage Service

System Design · Metadata plane vs data plane, chunk replication, and the atomic-commit moment.

mediumSign in to star problems

Move 200 TB of Media to GPU Training Hosts

System Design · Do the bandwidth arithmetic out loud, land in object storage, and never let the GPUs read small files.

hardSign in to star problems

Design an ML Evaluation Platform

System Design · Versioned benchmarks, cached (model, item) runs, and confidence intervals — presented as a spoken walkthrough.

hardSign in to star problems

Design Cloud Photo Storage and Multi-Device Sync

System Design · Bytes go straight to object storage; a per-library change feed with sync tokens is the actual product.

mediumSign in to star problems

Design a Centralized Logging System

System Design · Agents, a durable buffer, tiered storage — and deciding how much to index before the bill decides for you.

mediumSign in to star problems

Design Cross-Device Wallpaper Synchronization

System Design · A client-side design: apply locally at once, converge eventually, and never let sync touch the main thread.

mediumSign in to star problems

Design the APIs for an Election Voting System

System Design · One final ballot per voter, results sealed until close — contracts, the one-transaction rule, and a recount path.

mediumSign in to star problems

Design an Accurate Ad Click Aggregator

System Design · Dedup by impression, event-time windows with watermarks, idempotent sinks — and a batch recount that owns the truth.

mediumSign in to star problems

Design a File Sync Service

System Design · Content-addressed blocks, a per-namespace journal, and conflicted copies instead of silent loss.

mediumSign in to star problems

Design Disk-Based Inventory Serving

System Design · No SSD, little RAM: count seeks, make writes sequential, and keep the hot counters — not the metadata — in memory.

hardSign in to star problems

Scale Digit-Square Convergence Requests

System Design · One pass plus a 1,621-entry table makes compute free — so the design is about avoiding the network, not caching.

mediumSign in to star problems

Design a Video Sharing Platform

System Design · A transcoding pipeline feeding a CDN: egress is the bill, so codec, ladder and cache strategy are the design.

hardSign in to star problems

Design a Marketplace Catalog System

System Design · Category-driven attribute schemas, products versus offers, and a search index that is always rebuildable from the source of truth.

hardSign in to star problems

Design and Scale a Yelp-like Reviews Platform

System Design · Geo plus text search over a read-heavy model, with review writes fanned out through queues to aggregates and the index.

hardSign in to star problems

Design a Smartwatch Sensor Subsystem

System Design · Heart rate on a moving wrist inside a milliwatt budget: sensor choice, a sensor hub, motion-artifact rejection, and proof it works on everyone.

hardSign in to star problems

Migrate a Monolithic Wallet to Microservices

System Design · Strangle the monolith in phases, keep money movement inside one ledger's transaction, and use sagas only around the outside world.

hardSign in to star problems

Design an Autocomplete Component (Front End)

System Design · A reusable typeahead: the component API, a data layer that debounces, cancels and caches, and the combobox pattern done properly.

mediumSign in to star problems

Design a Music Streaming Web App (Front End)

System Design · A player that keeps playing across navigation, a queue model, streaming and preloading audio, and state shared across tabs and devices.

hardSign in to star problems

Design a Photo Sharing App (Front End)

System Design · An infinite feed of images without layout shift, optimistic likes, and an upload flow that resizes, strips location and survives a bad connection.

mediumSign in to star problems

Design a Distributed Job Scheduler

System Design · A job store as the source of truth, dispatchers that claim due runs with a unique key, leased workers, and a reaper — then the policies a template answer forgets.

hardSign in to star problems

Design a Distributed Key-Value Store

System Design · Non-functional requirements first, then one real decision per layer — and the large-value variant, where the lock must never cover the disk write.

hardSign in to star problems

Design an ACL Check Service

System Design · A durable source of truth for grants, a cache of compiled decisions on the caller's hot path, and a closed fail mode.

mediumSign in to star problems

Design a Cloud Queue Service

System Design · Start from a Queue class, then make every step survive a client, server or network failure in the middle of it.

mediumSign in to star problems

Design a Control Plane for Cloud Clusters

System Design · Desired state in a consistent store, controllers that reconcile, heartbeating agents, and a failure detector that fences before it replaces.

mediumSign in to star problems

Design an Audit Log Service

System Design · Append-only events partitioned by account then time, a hot store for recent queries, object storage for retention, and tamper evidence per account.

mediumSign in to star problems

Design a Pipeline From Bug Tickets to Generated Pull Requests

System Design · A ticket becomes a row with a state machine, a queue feeds long-running workers, and every step is idempotent because the AI step will be retried.

mediumSign in to star problems

Design an RPC Layer Over Hand-Written REST Calls

System Design · An interface definition that generates stubs and skeletons, with marshalling, discovery, deadlines, idempotent retries and versioning handled once.

mediumSign in to star problems

Design a Logging Library for Web and Mobile Clients

System Design · A non-blocking log() into a bounded buffer, flushed by size or time, persisted offline, with a stated policy for what to drop under pressure.

mediumSign in to star problems

Design a Client for an Unreliable Token Service

System Design · Cache tokens with expiry, refresh ahead of time with jitter, single-flight the refresh, and decide between a slightly stale token and a failed request.

mediumSign in to star problems

Design a Global Multi-Tenant Quota System

System Design · One usage record per tenant across every service, reserve-then-commit, idempotent usage events, and a chosen point between strict consistency and latency.

mediumSign in to star problems

Design a Distributed Metrics System

System Design · Agents batch to an ingest tier, a time-series store partitioned by metric and time, downsampling for age — and a hard line on cardinality.

mediumSign in to star problems

Design a Web Crawler at Scale

System Design · A frontier of URLs partitioned by host, fetchers that respect per-host limits, dedup by URL and by content, and failure handling that never stalls the crawl.

mediumSign in to star problems

Count the Nodes in a Tree of Servers

System Design · A request fans down the tree and counts fan back up; messages can be lost or duplicated, so every message carries an id and every handler is idempotent.

mediumSign in to star problems

Two-Phase Commit

System Design · Prepare on all participants, then commit; it blocks if the coordinator dies after prepare.

easySign in to star problems

How Does Raft Work?

System Design · A leader replicates a log to a majority before committing; a new leader is elected by majority vote.

easySign in to star problems

Design an Interactive SQL Notebook or Query Execution Service

System Design · A query is a record with a state machine: submit returns an id at once, workers stream results to storage, and clients fetch by id, never by connection.

mediumSign in to star problems

Design a Multi-Tenant Interactive Analytics Platform

System Design · Immutable columnar files in object storage, a transactional metadata service that commits snapshots, and stateless compute that scales per tenant.

hardSign in to star problems

Design a Metadata Catalog and Schema Registry

System Design · Versioned entities in a consistent store partitioned by tenant, a per-tenant change log that caches subscribe to, and soft deletes for undrop.

mediumSign in to star problems

Design a Cache for a DAG of Materialized Views

System Design · Key every entry by the view, its definition hash and the snapshot versions of all its inputs, so a changed input is a new key and nothing needs explicit invalidation.

mediumSign in to star problems

Design a Multi-Core Service Startup Scheduler

System Design · Kahn's algorithm with a ready queue and M running slots, where a service unblocks its dependants only after its health check passes and the longest remaining chain goes first.

mediumSign in to star problems

Design a Multi-Region API Whose Clients Need Tokens From a Flaky Third Party

System Design · Cache what the provider would tell you — signing keys, introspection results, permissions — so a provider outage degrades the API instead of taking it down.

mediumSign in to star problems

Design a Collaborative Spreadsheet (Front End)

System Design · A sparse cell map with formatting layers, a grid virtualised on both axes, dirty-subgraph recalculation over a dependency graph, and revisioned operations applied optimistically.

hardSign in to star problems

Design a Data Table Component (Front End)

System Design · A semantic table in one scroll container with a sticky header, a per-column contract, a width-resolution pipeline written to colgroup, and row virtualisation keyed by stable ids.

mediumSign in to star problems

Design a Flash Sale With a Virtual Queue

System Design · A waiting room that meters admission, stock that is decremented atomically under a hot key, and idempotency so retries never buy twice.

hardSign in to star problems

Design a Microblogging Dashboard From a Given Schema

System Design · Tweets, follows, likes and accounts tables are given; design the APIs, storage and the paginated top-X dashboard ranked by seven signals.

mediumSign in to star problems

Design Product Browse and Search for an Online Store

System Design · Catalog model, index schema and reindexing, query understanding, ranking and faceted browsing, and how search stays honest about price and stock at checkout.

hardSign in to star problems

Design a Global Multi-Game Leaderboard

System Design · Ranked views per game, region, season and friends that update right after a match: a rating algorithm, sorted sets for the read path, and idempotent result ingestion.

hardSign in to star problems

Design a Personalized Recommendation System

System Design · Logging to feature store to candidate generation to ranking to re-ranking, with cold start, evaluation and an A/B plan; the full pipeline for a streaming home feed.

hardSign in to star problems

Design a Clickstream Pipeline for a Billion Events a Day

System Design · Edge collectors into a durable log, stream processing for minute-fresh dashboards, batch for finalized daily aggregates, and the three follow-ups: lag, late data, exactly-once.

mediumSign in to star problems

Design an Analytics Pipeline, Then Take It Hybrid

System Design · Sources to landing zone to transforms to warehouse to BI, with named tools and alternatives at every stage; then the same design across on-prem and cloud, and on AWS versus Azure.

mediumSign in to star problems

Design a Shopping Cart (Front End)

System Design · Anonymous and signed-in carts across tabs and devices: a normalized client store, optimistic sync with idempotent writes, and the server as the source of truth for price and stock.

mediumSign in to star problems

Design a Feature Flag System (Front End)

System Design · Targeting by user, segment and percentage; delivery through a bootstrap plus an SDK with caching and push; consistent decisions across refreshes; defaults, dependencies and a kill switch.

mediumSign in to star problems

Design a Thread-Safe Batch Writer

System Design · Many threads submit records; one component buffers them and uses the database's batch API, flushing on size or time, holding the lock briefly, and draining cleanly on close.

mediumSign in to star problems

Design a Content Moderation System

System Design · Uploads flow through cheap filters, per-modality models and a human review queue; decisions are auditable, and past content can be replayed when the rules change.

hardSign in to star problems

Design a Payment System With Holds and Settlement

System Design · A payment-intent state machine, a real-time hold followed by batch settlement, idempotency keys so retries never charge twice, and a ledger that reconciles after bank timeouts.

hardSign in to star problems

Design Ticket Booking for a High-Demand On-Sale

System Design · Two separate problems: absorbing the burst at the moment sales open, and never selling the same seat twice, with holds that expire when payment does not arrive.

hardSign in to star problems

Design Top Songs by Country

System Design · Fifty thousand listen events a second become a top-ten list per country that refreshes every ten minutes and is read from a small cached object.

mediumSign in to star problems

Design Recent Like Counts and Trending Posts

System Design · Three reads over a 60-second window at a million likes a second: an exact count for one post from per-second buckets, and global and per-region top lists from a stream job.

hardSign in to star problems

Design a Real-Time Auction

System Design · Bids arrive over REST, are ordered per auction through a partitioned log, update a durable state machine, and are pushed to watchers over server-sent events.

hardSign in to star problems

Design a Synchronized Live Comment Overlay

System Design · Comments that fly across a video in step with playback: timeline-indexed storage for recorded video, fan-out over push connections for live, and sampling when a room is too busy to show everything.

mediumSign in to star problems

Design a Video-Keyword Association Review System

System Design · Batches of 50 videos against 1,000 keywords, edited over time: versioned submissions, resumable uploads, and recomputing only the pairs that a change touches.

mediumSign in to star problems

Design an AI-Driven QA Pipeline

System Design · From a requirements document to test cases, data, scripts, execution and a report, with role-specific agents that hand artifacts to one another, human checkpoints, and a CI environment that has no GPU.

mediumSign in to star problems

Design Overload Protection With Load Shedding

System Design · Keep a service doing useful work when demand exceeds capacity: detect overload from queue time, reject early by priority, bound every queue, and stop retries from making it worse.

mediumSign in to star problems

Design a RAG-Based Agent System

System Design · An agent that retrieves, calls tools and answers: the ingestion and retrieval path, the tool loop with state and limits, tracing for failed tool calls, and how its quality is measured.

mediumSign in to star problems

Prevent a Cache Stampede on a Hot Key

System Design · When a very popular cache entry expires, thousands of requests miss at once and all hit the database: let one caller rebuild, serve the old value meanwhile, and refresh before expiry.

mediumSign in to star problems

TCP vs UDP

System Design · TCP gives an ordered, reliable byte stream at the cost of setup and head-of-line blocking; UDP sends independent datagrams and leaves the rest to the application.

easySign in to star problems

The TCP Three-Way Handshake

System Design · SYN, SYN-ACK, ACK: each side proves it can send and receive and the two exchange starting sequence numbers; closing takes four segments.

easySign in to star problems

HTTP/1.1, HTTP/2, HTTP/3 and gRPC

System Design · HTTP/2 multiplexes streams on one TCP connection, HTTP/3 moves to QUIC over UDP to remove transport head-of-line blocking, and gRPC is typed RPC over HTTP/2.

easySign in to star problems

A Request's Path Into a Kubernetes Cluster

System Design · DNS, load balancer, ingress, Service virtual IP, pod: with what a node and a pod are, ClusterIP versus NodePort, DNS caching, and where to look when the answer is a 5xx.

easySign in to star problems

Kafka Delivery Semantics

System Design · Partitions give order, consumer groups give scale, and committing offsets before or after processing decides between at-most-once and at-least-once; exactly-once needs idempotence or transactions.

easySign in to star problems

The TLS Handshake and HTTPS Inspection

System Design · The handshake authenticates the server by certificate and derives session keys by key exchange; inspecting HTTPS means terminating TLS at something the client has been told to trust.

easySign in to star problems

Virtual Memory

System Design · Each process gets its own address space mapped page by page onto physical memory or disk, which is how programs can use more memory than the machine has.

easySign in to star problems

REST, WebSocket or Server-Sent Events?

System Design · Request and response, a two-way persistent socket, or a one-way server stream over HTTP: pick by who needs to talk and how often, as for an agent that streams its answer.

easySign in to star problems

The CAP Theorem

System Design · During a network partition a distributed store must choose between answering with possibly stale data and refusing to answer; it is a statement about partitions, not a permanent pick of two from three.

easySign in to star problems

Redis Persistence and Scaling

System Design · Snapshots and an append-only file for durability, replicas with Sentinel for failover, and Cluster's hash slots for sharding, around a single-threaded command loop.

easySign in to star problems

The Disk Is Full: Triage

System Design · From the filesystem that is full, to the directory, to the file, to the process, including the case where the space is held by a deleted file that is still open.

easySign in to star problems

The Backend Is Slow: Triage

System Design · Scope the problem with metrics, find the slow hop with traces, then test one hypothesis per layer: saturation, a dependency, the database, or a recent change.

easySign in to star problems