🌐

System Design (HLD)

High-level design fundamentals, load balancing, databases at scale, caching, distributed systems concepts, and the real interview favorites — design TinyURL, WhatsApp, Uber, Netflix — asked at companies like Meta, Amazon, and Google.

WhatsApp Deep Dive

Q

Design WhatsApp — what are the key functional and non-functional requirements (2B users, 100B messages/day, latency, consistency)?

intermediate

Tests whether you can scope a huge system design problem correctly before jumping to components.

Q

How does WhatsApp use WebSocket for real-time messaging? Why not HTTP polling?

intermediate

Tests whether you know a persistent connection avoids the latency and overhead of constantly re-establishing HTTP requests.

Q

What is the difference between sent, delivered, and read ticks in WhatsApp? How is each implemented?

intermediate

Tests whether you know each tick maps to a distinct acknowledgment event traveling back through the delivery pipeline.

Q

How does WhatsApp handle message delivery when the recipient is offline?

advanced

Tests whether you know messages queue server-side until the recipient's connection re-establishes, then flush in order.

Q

How does WhatsApp handle group messaging at scale — fanning a message out to up to 1024 members?

advanced

Tests whether you know large-group fanout is a genuinely harder scaling problem than 1-on-1 messaging.

Q

What is End-to-End Encryption (E2EE)? How does WhatsApp implement it using the Signal Protocol?

advanced

Tests whether you know the server never has the keys to read message content, and how key exchange still works per-device.

Q

How does WhatsApp store and deliver media (images, videos) — CDN, chunked upload, compression?

advanced

Tests whether you know media takes an entirely different storage/delivery path than lightweight text messages.

Q

How would you design WhatsApp's message delivery system to ensure no message is ever lost?

advanced

Tests whether you can combine acknowledgments, persistent queuing, and retry logic into a genuinely reliable delivery guarantee.

HLD Fundamentals & Scalability

Real System Design Problems

Q

Design Pastebin — store and share large blocks of text with expiration.

intermediate

A simpler cousin of the URL shortener: object storage for large text content (not just a short key-value pair), expiration handling, and a read-heavy caching strategy for popular pastes. Good for warming up estimation skills since the storage math is interesting (average paste size × daily pastes × retention period).

Q

Design a real-time Leaderboard — ranking millions of players by score.

intermediate

The 'sorted data at scale' problem: a relational database struggles with real-time rank queries at scale, which is exactly why Redis sorted sets (ZADD/ZRANK/ZREVRANGE) are the standard answer, giving O(log n) rank/update instead of a full sort on every query. At senior level, the probe extends to multi-dimensional rankings (daily/weekly/all-time) and historical leaderboard snapshots.

Q

Design a Content Management System (CMS) — versioning, drafts, and publish workflows at scale.

advanced

The read-heavy content delivery problem: content versioning, draft-vs-published state management, and how content is cached when it must be invalidated the instant something is published. The cache invalidation strategy on publish — pushing a fresh version out to every edge/cache layer without serving a stale draft — is the most interesting part.

Q

Design a Hotel Booking System (like Booking.com) — inventory and double-booking prevention.

advanced

The inventory-and-double-booking problem: how room availability is modeled and queried efficiently across date ranges, how concurrent bookings are prevented from double-booking the same room (locking vs optimistic concurrency), and how the booking and payment are completed as one consistent operation rather than two independently-failable steps.

Q

Design a Digital Wallet (like PayPal or Venmo) — atomic transfers and idempotent payments.

advanced

The financial consistency and idempotency problem: how transfers between accounts are made atomic, how the system prevents double-charging on a retried request, and how transaction history is stored for auditability. Idempotency keys on every payment operation are the central design detail interviewers probe hardest.

Q

Design a Live Video Streaming platform (like Twitch) — low-latency ingest and fan-out to millions.

advanced

The ingest-transcode-and-low-latency-delivery problem: how a live stream is ingested from a broadcaster, transcoded into multiple quality levels in near-real-time (unlike YouTube's offline transcode pipeline), and delivered to potentially millions of concurrent viewers with only a few seconds of latency.

Q

Design a Distributed Cache (like Redis Cluster) — consistent hashing and hot-key handling.

advanced

The consistent-hashing-and-replication problem: how data is distributed across cache nodes using consistent hashing, how virtual nodes improve distribution evenness, what happens when a node fails, and how the cache handles a hot key that receives wildly disproportionate traffic compared to every other key.

Q

Design a Flight Booking System — seat inventory and concurrent reservation across dates.

advanced

The seat-inventory-and-concurrent-reservation problem: how seat availability is queried efficiently across many flights and dates, how two users racing to book the last seat on a flight are handled correctly, and how the booking and payment complete as one consistent operation.

Q

Design an Ad Serving System — real-time auction and targeting in milliseconds.

advanced

The real-time-auction-and-targeting problem: how ads are selected and ranked within a strict millisecond budget, how targeting criteria are matched against user attributes at scale, and how impression/click events are collected reliably enough to be trusted for billing.

Q

Design Google's Web Indexing Pipeline — petabyte-scale crawl, parse, and index.

expert

The petabyte-scale data-pipeline problem: how the web is crawled at scale, how HTML is parsed and content extracted, how an inverted index is built and continuously updated across hundreds of machines, and how index freshness is maintained. Expect to reason about a MapReduce-style (or equivalent) batch processing pipeline, not a single-machine design.

Q

Design Amazon's Order Management System — cross-service consistency at massive scale.

expert

The multi-service saga problem at Amazon's scale: how an order touching payment, inventory, fulfillment, and notification services stays consistent when any one of those services can fail mid-flow, how the system handles an item going out of stock AFTER payment is already taken, and how order state is tracked reliably across the entire lifecycle.

Q

Design a Distributed SQL Database (like Google Spanner) — global strong consistency.

expert

The global-strong-consistency problem: how a database achieves strong consistency across geographically distributed nodes despite network delay, how a mechanism like TrueTime provides globally consistent timestamps, and what cross-region transactions actually cost in latency. This is asked almost exclusively for the most senior distributed-systems roles.

Q

Design Netflix's Video Recommendation System — offline training meets real-time serving.

expert

The large-scale ML-serving problem: the full pipeline from user-behavior data collection through offline model training to a real-time recommendation-serving layer, how recommendations get personalized for hundreds of millions of users, and how the system handles the cold-start problem for a brand-new user with no watch history yet.

Q

Design Meta's Social Graph Storage System — billions of relationships at query speed.

expert

The graph-at-social-network-scale problem: how billions of friendships and follow relationships are stored and queried, how the graph is partitioned across machines without making common queries prohibitively expensive, and how operations like mutual-friends or second-degree-connections execute efficiently at this scale.

Q

Design a Global Real-Time Multiplayer Game Backend — low-latency state sync across regions.

expert

The low-latency-state-synchronization problem: how game state stays synchronized across players in different geographic regions with minimal perceived lag, how conflicts are resolved when two players' actions affect the same game state simultaneously, and how matchmaking pairs players by both skill and geographic proximity.

Q

Design Uber's Surge Pricing System — real-time demand sensing and price computation.

expert

The real-time-demand-sensing-and-pricing problem: how supply and demand are measured in real time across many geographic zones, how prices are computed and pushed to users within seconds of a demand shift, and — the hardest part — how the system avoids a feedback loop where a price change itself causes a demand change that triggers yet another price change.

Q

Design Amazon's Global Payments Infrastructure — multi-region financial consistency.

expert

The multi-region financial-consistency problem: how a payment system maintains strong consistency across regions while still meeting real-time payment latency requirements, how regulatory requirements in different jurisdictions constrain where data can physically be stored, and how currency conversion and settlement work across markets.

Q

Design Google's Advertising Auction Infrastructure — billions of bids per day, in milliseconds.

expert

The real-time-bidding-at-enormous-scale problem: how billions of ad auctions per day are conducted within a millisecond budget, how targeting signals get applied at the moment of auction, how the billing system accurately tracks spend across billions of auctions, and how advertiser budget depletion is enforced in real time so no advertiser overspends.

Q

Design Meta's Cross-Platform Identity System — one identity across Facebook, Instagram, and WhatsApp.

expert

The unified-identity-across-products problem: how user identities are linked across products that each have different underlying data models, how privacy requirements and regulatory constraints differ across products and jurisdictions, and how a change to one identity correctly propagates to every linked product.

Q

Design AWS's Infrastructure Provisioning System — validating, queuing, and executing resource requests globally.

expert

The infrastructure-as-code-and-resource-management problem: how cloud resource requests are validated, queued, and executed across a global fleet, how capacity is managed so resources are actually available when requested, and how the system handles PARTIAL provisioning failures where some resources in a stack succeed and others fail.

Q

Design a Global Event Streaming Platform (like Kafka at LinkedIn scale) — trillions of messages per day.

expert

The streaming-infrastructure-at-internet-scale problem: how a message queue processing trillions of messages a day is architected, how topics are partitioned and replicated across a global fleet of brokers, how consumer lag is monitored and managed, and how the platform survives the failure of an entire data center without losing messages or needing manual intervention.

Q

Design a project management tool like Jira — issues, boards, workflows, permissions.

advanced

Tests whether you can model a complex, permission-heavy, highly configurable domain, not just a simple CRUD app.

Q

Design a real-time collaboration tool (like Google Docs) where multiple users edit the same document simultaneously.

expert

Tests whether you know operational transformation or CRDTs are what make concurrent editing actually converge correctly.

Q

Design a URL shortening service like TinyURL.

intermediate

The most classic system design opener — tests encoding strategy, collision handling, and read-heavy scaling.

Q

Design a real-time chat system like WhatsApp.

intermediate

Tests whether you can design delivery guarantees, message ordering, and real-time connections at massive scale. Asked at: Meta, Google, Uber

Q

Design a search system for knowledge base articles used by millions of users.

advanced

Tests whether you know when to move beyond database LIKE queries to a dedicated search engine like Elasticsearch.

Q

Design Slack/Teams — channels, threads, and search at scale.

advanced

Tests whether you know channel-based fanout and message search have different scaling characteristics than 1-on-1 chat. Asked at: Salesforce, Microsoft, Atlassian

Q

Design Twitter — posting tweets, following, and timeline generation.

intermediate

Tests whether you know the fanout-on-write versus fanout-on-read tradeoff for celebrity accounts with millions of followers. Asked at: Meta, X, Amazon

Q

Design YouTube — video upload, transcoding, storage, streaming.

intermediate

Tests whether you can design a pipeline for chunked upload, async transcoding, and adaptive bitrate streaming. Asked at: Google, Microsoft

Q

Design a distributed messaging system that guarantees ordered, reliable delivery across regions.

expert

Tests whether you can combine partitioning, replication, and ordering guarantees into one coherent messaging backbone.

Q

Design a centralized logging and monitoring system for hundreds of microservices.

advanced

Tests whether you know how ingestion, indexing, and query layers need to scale independently for a system like this.

Q

Design Uber — rider requests, driver matching, trip tracking.

advanced

Tests whether you can design geospatial indexing and real-time matching under tight latency constraints. Asked at: Uber, Lyft, Google

Q

Design a workflow automation system (like Zapier) that triggers actions based on configurable rules across many integrations.

expert

Tests whether you can design a pluggable trigger-action engine that scales across arbitrary third-party integrations.

Q

Design a rate limiter for an API — prevent abuse at scale.

advanced

Tests whether you can design a distributed rate limiter, not just a single-process token bucket. Asked at: Amazon, Stripe, X

Q

Design a distributed key-value store like DynamoDB or Cassandra.

advanced

Tests whether you can bring together consistent hashing, replication, and CAP tradeoffs into one coherent design. Asked at: Amazon

Q

Design a distributed job scheduler that avoids duplicate execution across multiple instances.

expert

Tests whether you know a naive cron-per-instance setup breaks the moment you scale beyond one node.

Q

Design a flash sale system for 10 million users all trying to buy one product at exactly the same second. How do you prevent overselling?

expert

Tests whether you can combine an atomic inventory decrement, a request buffer, and idempotency into one design under extreme concurrent load.

Q

Design a notification system — push, SMS, email — at 100M users/day.

advanced

Tests whether you can design multi-channel fanout with retries, rate limiting per user, and provider failover.

Saga Pattern Deep Dive

Databases & Storage

NGINX & Reverse Proxies

Caching

Distributed Systems Trade-offs

Q

What does the CAP theorem actually state? Why can a distributed system only guarantee two of Consistency, Availability, and Partition tolerance, not all three?

intermediate

Tests whether you understand the actual proof intuition, not just the acronym.

Q

What is the difference between Leader-Follower (Master-Slave) and Leaderless replication?

advanced

Tests whether you know the coordination and conflict-resolution tradeoffs each replication model makes.

Q

Compare rate limiting algorithms: Token Bucket vs Leaky Bucket vs Fixed Window vs Sliding Window.

advanced

Tests whether you know each algorithm handles burstiness and window-boundary edge cases differently.

Q

What is the difference between push-based and pull-based architecture for notifications and feeds?

intermediate

Tests whether you know the tradeoff between instant delivery cost and on-demand fetch cost at scale.

Q

What is the difference between stateful and stateless architecture? Why do cloud-native designs prefer stateless?

intermediate

Tests whether you know statelessness is what makes horizontal scaling and failover trivial instead of painful.

Q

What is the difference between vertical partitioning and horizontal partitioning (sharding)?

intermediate

Tests whether you know one splits a table by columns and the other by rows, and which one actually improves write scalability.

Q

What is the difference between write-through cache, write-back cache, and cache-aside pattern?

advanced

Tests whether you know the durability-versus-latency tradeoff each write strategy makes.

Messaging & Distributed Systems