contentintech
Learn/System Design/System Design Workshops & Interview Review
Intermediate~15 min read

System Design Workshops & Interview Review

Practice ten end-to-end designs with invariants, APIs, data models, scaling, failures and review prompts.

System DesignDistributed SystemsInterviews

Use the same review structure for every design

Clarify users and operations, quantify traffic/storage, define invariants and SLOs, sketch a minimal architecture, then deepen the bottleneck or correctness risk. Finish with failures, security, observability and cost. A service diagram without the request path and data model is incomplete.

Time-box a 45-minute practice session: roughly five minutes on scope, five on estimates, ten on contracts/data/path, fifteen on the critical deep dive and ten on failure review. Adapt to the interviewer; this is a practice structure, not a scoring rule.

URL shortener

Use a unique short-code index and an owner/expiry-aware create API. Choose random codes with collision retry or allocated IDs plus encoding. Redirect reads can use an edge/cache layer; private links and mutable destinations need a clear cache invalidation policy. Track abuse and avoid allowing the service to become an open phishing redirect.

Deep dive: calculate collision risk, define 301 vs 302 behavior, describe expiration and analytics loss tolerance. Existing worked designs provide a starting architecture.

News feed

Write posts to authoritative storage, then produce feed candidates. Fan-out-on-write makes reads cheap but creates expensive celebrity writes; fan-out-on-read postpones work and complicates read latency. A hybrid handles ordinary accounts differently from high-fan-out publishers. Rank candidates and cache bounded pages.

Deep dive: privacy/delete propagation, stable pagination, duplicate events, backfill, fresh posts and ranking failure fallback. A user's block action cannot wait indefinitely for a stale feed projection.

Chat and notifications

Separate durable messages from transient presence and live socket routing. Use stable message IDs, conversation ordering and resume cursors. A notification pipeline applies user preferences, quiet hours, channel limits and provider retries independently from the chat transaction.

Deep dive: offline delivery, multiple devices, reconnect, retention, unread counts and duplicate email suppression. Study real-time communication before claiming the socket is the whole solution.

Ticket booking and payments

Seats have an authoritative reservation state and expiry. Use a transaction or atomic compare-and-set to prevent overselling. Payment is a durable workflow with unknown-result handling, provider idempotency and reconciliation. Expiry workers and successful payment callbacks can race; define a finalization rule.

Deep dive: flash-sale admission, fairness, expired reservations, late payments, refund compensation and fraud controls. A Redis lock without resource-enforced correctness is insufficient.

Distributed rate limiter

Pick the policy: fixed window, sliding log/counter, token bucket or leaky bucket. Key by a trusted identity and decide burst capacity, refill rate and atomic update mechanism. A multi-region limiter may use local budgets for speed while accepting bounded overshoot.

Deep dive: fail-open vs fail-closed per endpoint, uneven regional demand, clock drift, hot identities and client retry guidance. The API design lesson explains contract-level feedback.

File storage and video processing

Upload directly to object storage through authorized URLs, finalize metadata after validation and enqueue processing. Transcoding uses bounded workers and resumable jobs. Store variants under versioned object keys and distribute through a CDN.

Deep dive: large/multipart retry, poison files, duplicate processing, thumbnail consistency, storage lifecycle and private playback. Compute backlog and worker capacity separately from upload bandwidth.

Search engine and crawler

A frontier schedules permitted URLs while deduplicating and enforcing host politeness. Fetchers parse content, indexers build searchable documents and ranking serves queries. Respect robots directives and access boundaries; publicly reachable does not imply unlimited permitted use.

Deep dive: canonical URLs, update detection, malicious content, distributed frontier fairness, partial index rebuild and deleting stale results. Bloom filters can reduce probes but must not be the sole correctness store.

Ride matching and geospatial services

Track recent positions, use spatial candidates and exact distance filtering, then transact the assignment. Location freshness and driver availability are separate states. Partition by geography while handling hotspots and movement across boundaries.

Deep dive: abandoned offers, duplicate assignment, privacy, driver updates arriving out of order, nearby-cell expansion and regional outage. Follow storage and geo.

Metrics ingestion and streaming analytics

Accept batches/events into a durable buffer, partition processing, aggregate by event-time windows and expose queryable results. Choose lateness policy, replay behavior, schema evolution and retention. OLAP storage serves analytical scans; operational transactions remain elsewhere.

Deep dive: cardinality explosions, backpressure, poison events, approximate counts, cost and end-to-end freshness. Compare streaming platforms on semantics rather than logo popularity.

Multi-tenant job scheduler

Store schedule definitions and unique run identities. Dispatch due runs into a durable queue, lease bounded worker attempts and record terminal results. Use idempotency/fencing for side effects. Fairness prevents one tenant from monopolizing workers.

Deep dive: daylight-saving behavior, clock changes, overlapping runs, retries, cancellation, poison tasks, quotas and leader failover. At-least-once execution plus safe side effects is often a clearer contract than unqualified exactly-once claims.

Review checklist and mastery evidence

For each design, produce an API example, a schema with keys/indexes, a traffic estimate, one happy-path trace, three failure traces and a trade-off table. Explain which facts are measured and which are assumptions. Then change one requirement: tenfold traffic, strict consistency, a lost region or a lower budget.

You are ready to discuss the design when you can defend its invariants, identify its first bottleneck, recover after partial failure and simplify it for a smaller workload. Reading every lesson is useful preparation; it is not assessed mastery or a hiring guarantee.

Section navigation