Design a URL Shortener
Most candidates fail this problem not because URL shortening is hard, but because they over-design too early or give choices without proving them.
🎉 Launch Sale: Get 30% off annual plans with code LAUNCH30
🎉 Launch Sale: Get 30% off annual plans
LAUNCH30Use code at checkout for exclusive savings on yearly membership
Real content with database schemas, API designs, capacity calculations, and the exact tradeoffs interviewers expect you to discuss.
Catalog snapshot
Articles
62
Topics
27
Reading
850m
Most candidates fail this problem not because URL shortening is hard, but because they over-design too early or give choices without proving them.
Goal: fast home feed reads at massive scale while handling write amplification and celebrity skew.
This is a real-time system design problem where correctness, latency, and failure handling matter more than drawing many boxes.
This problem is about protecting downstream services under load while preserving fair access.
Designing ride hailing is about real-time decisions under uncertainty: live locations, fast matching, ETA quality, and failure-safe trip lifecycle.
Goal: deliver notifications across multiple channels (push/email/SMS) reliably, with user preferences and retries.
Ad measurement systems break when teams optimize ingestion throughput but ignore correctness contracts such as deduplication, attribution windows, and anti-fraud boundaries. This design prioritizes...
Facebook feed design is a ranking-heavy, read-dominant problem where product quality and system reliability are tightly coupled. The challenge is not only serving fresh posts quickly, but doing it ...
A video streaming platform is three different systems that must behave like one product: upload ingestion, asynchronous transcoding, and low-latency playback delivery. The hard part is not drawing ...
Short video platforms look like simple video hosting, but the real system problem is sub-200ms time-to-first-frame for infinite scroll, hyper-personalized recommendations that update in real-time b...
A realtime document platform is a consistency system disguised as a text editor. The product feels simple to users, but the core engineering challenge is preserving intent and convergence under con...
A crawler looks simple until scale and politeness collide: billions of URLs, duplicate pages, robots rules, and scheduling freshness.
A cloud file sync system looks simple in demos and fails in production when clients treat sync as naive file upload/download. Real correctness is about version vectors, conflict policy, delta trans...
Autocomplete is a latency problem with ranking constraints: users expect useful suggestions in <100ms while index freshness keeps changing.
In this problem, the challenge is not only low latency. A cache must stay fast under pressure, predictable under failures, and safe for downstream databases during miss storms.
Goal: prevent double-booking under high concurrency while keeping booking flow responsive.
Schedulers fail when dispatch throughput is optimized but execution guarantees are vague: duplicate runs, starvation, runaway retries, and opaque recovery. This design focuses on deterministic sche...
An API gateway is a control point for routing, auth, retries, limits, and observability. The main risk is becoming both bottleneck and failure amplifier.
Payment systems fail less from single bugs and more from broken guarantees: duplicate charges, inconsistent ledgers, and weak reconciliation loops. This walkthrough focuses on correctness-first arc...
Trending is not just "most viewed". The ranking must balance freshness, momentum, spam resistance, and regional relevance, while remaining explainable enough to debug ranking anomalies. This design...
Music streaming looks like simple audio file delivery, but the real system problem is seamless gapless playback across variable network conditions, hyper-personalized recommendations combining coll...
Live comments look like a simple chat stream, but the real system problem is low-latency fanout under bursty write spikes, abuse resistance, ranking/relevance choices, and replay consistency when u...
Workspace messaging looks like a simple chat app, but the real system problem is managing stateful WebSocket connections at scale, presence propagation across millions of users, message fanout to c...
Real-time collaborative editors are not just "WebSocket + save to DB." The hard part is preserving a responsive typing experience while converging to one consistent document under concurrent edits,...
An online chess platform looks straightforward at product level, but interview depth comes from realtime correctness, fair matchmaking, anti-cheat enforcement, and low-latency analysis under high f...
A maps platform is not one system. It is four coupled systems with different physics: low-latency map rendering (tiles), compute-heavy path search (routing), uncertainty-aware travel prediction (ET...
An FB Marketplace-like platform looks simple at UI level, but interview depth comes from local relevance, listing integrity, buyer-seller messaging reliability, abuse control, and low-latency read ...
A retail trading platform is primarily a correctness system with strict latency goals, not just a fast UI. The hardest part is balancing UX speed, market integrity, regulatory controls, and financi...
Live streaming platforms look like simple video broadcast, but the real system problem is sub-3-second glass-to-glass latency while scaling to millions of concurrent viewers, handling thousands of ...
Video conferencing looks like simple media streaming, but the real system problem is managing real-time bidirectional media with sub-200ms latency, handling heterogeneous network conditions across ...
A distributed search system is a two-speed architecture: writes build and refresh indexes continuously, while reads must return relevant results under strict latency SLOs. This walkthrough focuses ...
An object storage design interview tests whether you can separate data-plane scale from control-plane correctness: massive read/write throughput, durable bytes, cheap lifecycle management, and pred...
A CDN design interview is usually about one core skill: can you move bytes closer to users while keeping correctness, cost, and operational safety under control. This walkthrough focuses on cacheab...
Recommendation serving is an online decision system: every request must return relevant items fast, safely, and with measurable business impact. This design focuses on low-latency personalized serv...
Email delivery looks simple at API level, but production reliability depends on policy enforcement, sender reputation, ISP feedback loops, and strict separation between urgent transactional traffic...
Real-time analytics systems fail when teams optimize ingestion throughput but ignore semantic correctness, late data handling, and query isolation. This design prioritizes accurate, low-latency ins...
A distributed lock service is not about storing a lock key; it is about preserving mutual exclusion and bounded wait under failures, retries, and clock drift. This design targets practical correctn...
Distributed configuration services look easy until the first bad rollout. The hard part is not storing key-value pairs; it is keeping reads fast, updates safe, and behavior predictable during parti...
A metrics platform fails in practice when teams optimize scrape and ingest throughput, but ignore cardinality controls, query isolation, and long-term retention economics. This design keeps fast op...
Feature flag systems fail when teams focus on toggles but ignore consistency, blast-radius control, and lifecycle hygiene. This design prioritizes safe progressive delivery with low-latency runtime...
Fraud systems fail when teams optimize only model accuracy while ignoring serving latency, feedback loops, and false positive cost. This design keeps real-time blocking, near-real-time review, and ...
Payment API success is not financial truth. Money correctness is established only after internal records, PSP/acquirer outcomes, settlement files, fees, and chargeback events are reconciled into on...
An online code execution platform is a controlled untrusted-compute system: users submit code in many languages, the platform compiles/runs it safely, and returns output quickly without letting one...
Global chat systems look simple at UI level, but the backend is a hard mix of low latency, durability, ordering boundaries, and regional failure handling.
Observability systems fail when ingestion success is prioritized over query usability, or when cardinality explodes without guardrails.
Dating apps are not just swipe APIs. The hard parts are low-latency candidate serving, exactly-once-ish interaction recording, consistent match creation, and safe real-time messaging under abuse co...
Fitness platforms combine telemetry ingestion, geospatial processing, social interactions, and fairness-sensitive leaderboards. The hard part is balancing fast uploads and feed freshness with corre...
Nearby discovery looks simple at product level ("show me what is near me"), but the hard part is balancing low-latency relevance with strong location privacy guarantees. The system must answer geo ...
Calendar systems look simple until recurrence, timezone shifts, invite workflows, and conflict-free sync collide at scale. The hard part is preserving scheduling correctness while keeping sharing a...
News feed systems are latency-sensitive ranking systems under strict trust constraints. The hard part is not rendering cards; it is ingesting fast-changing publisher content, ranking per user inten...
Auction systems are fairness-critical transaction systems disguised as simple listing apps. The hard parts are bid ordering correctness, auction-close race handling, anti-sniping policy, payment/se...
A price tracker sounds simple at product level, but interview depth comes from handling massive crawl skew, noisy merchant feeds, duplicate product mappings, and user alert latency under bursty pri...
Multiplayer games look like a simple client-server exchange, but the real system problem is sub-50ms state propagation under adversarial latency, cheat-resistant authoritative logic, deterministic ...
Live sports scores look like a simple data feed, but the real system problem is sub-second delivery to millions of concurrent users during peak moments, handling 100x traffic spikes during major ev...
Podcast platforms look like simple audio hosting, but the real system problem is efficiently ingesting millions of RSS feeds with varying update frequencies, delivering large audio files (50MB-500M...
Image processing pipelines look like simple resize operations, but the real system problem is on-the-fly transformation at CDN edge with sub-100ms latency, supporting infinite transformation combin...
Distributed task queues look like simple message passing, but the real system problem is exactly-once task execution under worker failures, visibility timeout tuning that balances latency with reli...
Secret management systems look like simple key-value stores, but the real system problem is encryption at rest with secure unsealing, dynamic credential generation with automatic rotation, fine-gra...
Experimentation platforms look like simple feature flags with analytics, but the real system problem is statistically rigorous assignment with minimal latency, consistent user bucketing across sess...
Log aggregation systems look like simple storage with search, but the real system problem is ingesting terabytes of logs per day without data loss, indexing for sub-second search across billions of...
Database connection poolers look like simple proxies, but the real system problem is multiplexing thousands of application connections over limited database connections, choosing the right pooling ...
Canary deployment systems look like simple traffic splitting, but the real system problem is progressively shifting traffic with automatic rollback on degradation, defining meaningful health metric...