See It Flow
Messaging Platform · opening, deep dives & full question bank

Interview Perspective

How to communicate a WhatsApp-style system design answer without overclaiming, skipping correctness, or treating every problem as “Kafka plus WebSockets.” It covers the opening narrative and a follow-up question bank, so each likely probe has a clear direction and a place to read deeper.

Mangesh MandlikLast updated:
Interview 01

Opening the Design

Start by shrinking the scope. “Design WhatsApp” is too broad until you clarify whether the interviewer wants 1:1 only, groups, offline delivery, media, multi-device, and E2EE.

A strong opening sounds like: “I'll focus on the messaging pipeline: persistent connections, durable acceptance, ordering, offline sync, groups, and multi-device. I'll treat media and E2EE at architecture-impact level unless you want to go deeper.”

Interview 02

Requirements & Scale Estimation

Use scale to reveal the shaping constraints, not to pretend you know proprietary product internals.

Label numbers like 500M DAU, 200M concurrent, 100B messages/day, or 50K connections per gateway as illustrative assumptions. Then explain why different dimensions matter separately: concurrent sockets, message writes, receipt amplification, sync bursts, and media bytes.

A common memory-estimation mistake: a registry with 200M entries does not “easily fit in 20 GB” just because the raw payload math says so. Overhead, replication, multi-device entries, and operational headroom matter.

Interview 03

Discussing Persistent Connections

Explain why polling fails, why WebSocket is the default for chat, and why a gateway tier might eventually be separated.

Compare WebSocket, SSE plus HTTP sends, and long polling. HTTP/2 Server Push is not a suitable alternative for application chat and does not belong in this comparison. Then explain that the registry maps a user to multiple device routes, not to one connection forever.

Strong candidates also volunteer reconnect storms, slow-consumer handling, and stale-route behavior without waiting to be asked.

Interview 04

Message Ordering & Delivery

This is where interviewers test whether you can define guarantees precisely rather than with nice-sounding words.

Say ordering is per conversation. Then explain that consistent hashing may help route a conversation but is not itself the proof of correct ordering under failure. Some conversation ordering authority still has to own sequence assignment or ordered append.

Likewise define delivery semantics precisely: sender ACK means durable server acceptance; delivered means the chosen recipient-device semantic; read is a later event. If the ACK is lost after the write, idempotent retry must return the same message identity and order.

Interview 05

Groups & Fan-Out

Groups are where a simple 1:1 story breaks into fan-out, membership, and receipt-cost questions.

Start from small interactive groups, then explain when synchronous delivery stops making sense and async fan-out or channel-style behavior becomes more appropriate. Treat any threshold as illustrative, not as universal product law.

Also distinguish interactive groups from broadcast channels. The latter usually store once, notify, and let readers fetch, rather than pretending to maintain rich per-recipient synchronous delivery state.

Interview 06

Storage & Scale

Storage questions are really about workload shape: append-heavy ordered history, hot conversations, and offline sync.

Avoid saying conversation ID alone is always the physical partition key forever. A better answer introduces conversation-level logical grouping plus bucketed physical partitioning when history volume or hotspot risk requires it.

Also compare relational and distributed wide-column options honestly. At modest scale SQL is often fine; at very high append rates a wide-column design may fit better. The right answer depends on workload, not fashion.

Interview 07

Common Mistakes

Most messaging-system interview misses are judgment misses, not vocabulary misses.

Skipping ACK semantics

If you cannot define what “sent” means, the rest of the design is built on ambiguity.

Forgetting multi-device

One user rarely means one connection or one delivery target.

Unsafe idempotency

Read-before-write dedup sounds reasonable and still races.

Universal thresholds and absolutes

Claims like “50K sockets/server”, “256-member cutoff”, or “core messaging never depends on Kafka” need hedging and context.

Treating push as truth

Push is a wake-up hint, not the authoritative message path.

Interview 08

Full Question & Follow-Up Bank

Requirements & Scope

Design WhatsApp / Messenger. What requirements do you lock down first?

Strong answer angle

Strong answer direction: clarify 1:1 vs groups, offline delivery, multiple devices, read receipts, media, and E2EE before drawing boxes. What interviewer is testing: whether you can shrink a huge problem into an interview-sized core. Read deeper: Offline Message Sync and End-to-End Encryption Impact.

Likely follow-ups
  • What retention assumption are you making? — Label it explicitly as an illustrative product assumption, because retention shapes storage cost and sync backlog.
  • Do edits, deletes, or reactions belong in the MVP? — Usually mention them as bounded extensions, not as the first thing you optimize for.

How would your answer change if this were 1:1 only?

Strong answer angle

Strong answer direction: simplify group fan-out, membership, and giant receipt-explosion concerns; keep durable acceptance, routing, sync, and multi-device. What interviewer is testing: whether you can reduce complexity when scope shrinks. Read deeper: Group Message Fan-Out.

Likely follow-ups
  • Would you still keep separate gateways? — Maybe not at small scale; justify with connection count and operational goals.

Persistent Connection

Why WebSocket instead of SSE or polling?

Strong answer angle

Strong answer direction: messaging is bidirectional and latency-sensitive, so one persistent duplex connection is the cleanest fit. What interviewer is testing: your ability to compare alternatives instead of naming the default by reflex. Read deeper: WebSocket vs SSE vs Long Polling.

Likely follow-ups
  • What are the operational downsides of WebSocket? — Connection draining, reconnect storms, socket buffers, heartbeat cost, and long-lived connection management.

Why separate gateway and messaging tiers?

Strong answer angle

Strong answer direction: connection lifecycle and message processing scale differently; splitting them gives independent scaling and failure isolation. What interviewer is testing: can you justify service boundaries from workload differences. Read deeper: WebSocket Gateway Internals.

Likely follow-ups
  • When would you combine them? — At modest scale where fewer moving parts matter more than independent scaling.

How do you route one user with three devices?

Strong answer angle

Strong answer direction: registry returns multiple device or session routes, not one user route. What interviewer is testing: whether you naturally model multi-device. Read deeper: Connection Registry & Multi-Device Routing.

Likely follow-ups
  • What if the registry entry is stale? — Target gateway rejects it, service re-looks up, then falls back to sync or push if no live route remains.

Send / Idempotency

What does the sender ACK mean?

Strong answer angle

Strong answer direction: the server durably accepted the logical message according to the write contract; it does not mean recipient delivered, read, or push succeeded. What interviewer is testing: guarantee precision. Read deeper: Message Write State Machine.

Likely follow-ups
  • Why is that distinction important? — Because every later retry, receipt, and outage explanation depends on it.

Client times out after send—retry or not?

Strong answer angle

Strong answer direction: retry with the same client-generated idempotency key. What interviewer is testing: whether you see ambiguity as normal. Read deeper: Message Idempotency.

Likely follow-ups
  • Why is read-before-write dedup unsafe? — Another worker can win the race between the read and the insert.

What if the DB commit succeeded but the ACK was lost?

Strong answer angle

Strong answer direction: the retry must return the original server message identity and sequence. What interviewer is testing: canonical messaging correctness reasoning. Read deeper: ACK Lost After Durable Write.

Likely follow-ups
  • How do you make that atomic? — Use conditional insert, uniqueness, transaction, or equivalent durable idempotency record.

Ordering

What ordering guarantee do users actually need?

Strong answer angle

Strong answer direction: per-conversation ordering, not global ordering. What interviewer is testing: whether you right-size the guarantee. Read deeper: Message Ordering & Sequencing.

Likely follow-ups
  • Would timestamps be enough? — No—clock skew and concurrency make them a poor strict ordering source.

How do you assign sequence numbers if two users send concurrently?

Strong answer angle

Strong answer direction: serialize accepted writes through a conversation ordering authority—ordered log partition, sequencer owner with fencing, or storage conditional update. What interviewer is testing: failure-aware ordering design. Read deeper: Message Ordering & Sequencing.

Likely follow-ups
  • What if the sequencer dies? — New owner needs a higher epoch; stale owner writes must be rejected.

What if message 103 arrives before 102?

Strong answer angle

Strong answer direction: bounded buffering plus gap repair, then fall back to sync if needed. What interviewer is testing: client-visible correctness under transport reordering. Read deeper: Message Gap Recovery.

Likely follow-ups
  • Do you just wait 500 ms? — No fixed wait is universally correct; bounds depend on UX and network assumptions.

Offline Sync

Recipient is offline for two days—how do they recover?

Strong answer angle

Strong answer direction: authenticate the device, present its durable cursor, replay missed message and receipt events, advance cursor after safe apply. What interviewer is testing: recovery-path thinking, not just happy-path push. Read deeper: Offline Message Sync.

Likely follow-ups
  • Do you query every conversation? — Not as the primary reconnect path at scale.

What is a sync cursor?

Strong answer angle

Strong answer direction: a durable checkpoint meaning “all changes up to here are safely applied.” What interviewer is testing: whether you can name an authoritative sync primitive. Read deeper: Offline Message Sync.

Likely follow-ups
  • What if the cursor expired? — Switch to full reconciliation or snapshot-based recovery.

Multi-Device

Phone and laptop are both online—where do you deliver?

Strong answer angle

Strong answer direction: to all relevant active device sessions, then aggregate to a product-level delivery state such as “delivered when any active device ACKs.” What interviewer is testing: multi-device routing plus semantic clarity. Read deeper: Connection Registry & Multi-Device Routing and Message Delivery Receipts.

Likely follow-ups
  • How do the sender's own devices stay converged? — Send and sync events also fan out to the sender's other devices.

What happens when a device is removed?

Strong answer angle

Strong answer direction: remove routing state, invalidate or rotate any device-specific crypto or session state, and stop future delivery to that device. What interviewer is testing: lifecycle completeness. Read deeper: End-to-End Encryption Impact.

Likely follow-ups
  • Does old history remain on the removed device? — That depends on product and crypto policy; removal mainly affects future routing and key trust.

Group

How would you handle group send for 10 members, 1,000 members, and 100,000 subscribers?

Strong answer angle

Strong answer direction: evolve from direct or mostly synchronous group delivery, to async fan-out, to broadcast/channel-style store-once plus audience delivery semantics. What interviewer is testing: ability to shift architecture with audience size. Read deeper: Group Message Fan-Out and Broadcast / Channel Messaging.

Likely follow-ups
  • What is the group-size threshold? — It depends on workload; treat any number as illustrative, not universal.

How do you define membership at send time?

Strong answer angle

Strong answer direction: use a durable membership source of truth plus a version or snapshot attached to the accepted message. What interviewer is testing: race-condition reasoning. Read deeper: Group Membership Consistency.

Likely follow-ups
  • What if a user is removed during fan-out? — Apply the chosen membership snapshot semantics consistently.

Storage

SQL or Cassandra/Scylla/Dynamo-style store?

Strong answer angle

Strong answer direction: compare workload shape, append rate, ordered range reads, and operational scale rather than parroting a vendor. What interviewer is testing: storage judgment. Read deeper: Message Storage & Partitioning and Messaging Storage Choice.

Likely follow-ups
  • Why not one unbounded conversation partition? — Because long-lived or hot conversations eventually create unhealthy physical partitions.

What is the source of truth: conversation log or inbox?

Strong answer angle

Strong answer direction: state it explicitly; a common answer is conversation log as source of truth plus sync or delivery indexes. What interviewer is testing: architectural boundary clarity. Read deeper: Conversation Log vs Inbox.

Likely follow-ups
  • How do you paginate history? — Start from newest bucket and page backward by sequence or time bounds.

Presence / Ephemeral State

How do you know if a user is online?

Strong answer angle

Strong answer direction: derive from heartbeat-backed leases across active sessions, then expose a privacy-aware aggregate. What interviewer is testing: whether you separate ephemeral state from durable history. Read deeper: Presence Architecture.

Likely follow-ups
  • Why TTL instead of exact global updates? — Because approximate freshness is much cheaper and sufficient.

Why can typing indicators be dropped?

Strong answer angle

Strong answer direction: they are short-lived hints with no durable business value after they expire. What interviewer is testing: prioritization under load. Read deeper: Typing Indicators.

Likely follow-ups
  • Would you ever store typing events? — Normally no; at most transiently for very short TTL handling.

Media

Why separate the media path?

Strong answer angle

Strong answer direction: large uploads would block the low-latency message lane and distort storage behavior. What interviewer is testing: workload separation thinking. Read deeper: Media Message Architecture.

Likely follow-ups
  • How do you authorize download? — Issue an authorized object or CDN fetch path tied to the message or media reference policy.

How does E2EE affect media?

Strong answer angle

Strong answer direction: clients may encrypt media before upload and exchange references or keys through the message path. What interviewer is testing: architecture-level crypto impact, not protocol memorization. Read deeper: End-to-End Encryption Impact.

Likely follow-ups
  • What if the CDN is down? — Text chat can continue while media fetch degrades.

Kafka / Async

Is Kafka on the critical message path?

Strong answer angle

Strong answer direction: define the boundary explicitly; it may power async fan-out or notifications without being required for sender ACK of 1:1 chat. What interviewer is testing: dependency-boundary clarity. Read deeper: Event Stream / Kafka Role.

Likely follow-ups
  • What if Kafka goes down? — Only Kafka-dependent workflows degrade; accepted message correctness still needs a durable async handoff strategy.

How do you avoid the DB-write / event-publish dual-write bug?

Strong answer angle

Strong answer direction: use a transactional outbox or other durable handoff pattern. What interviewer is testing: async correctness beyond the happy path. Read deeper: Event Stream / Kafka Role.

Likely follow-ups
  • Is producer buffering enough? — No—in-memory buffers are not durable outage recovery.

Multi-Region

Users are in different regions—where is the conversation written?

Strong answer angle

Strong answer direction: start with one conversation home region or current write authority, then replicate or deliver cross-region. What interviewer is testing: ordering under geography. Read deeper: Multi-Region Messaging.

Likely follow-ups
  • Why not active-active everywhere? — Because ordering, partition behavior, and split-brain risk become much harder.

How do you prevent split brain?

Strong answer angle

Strong answer direction: one authority at a time with leases, fencing, or stronger consensus depending on requirements. What interviewer is testing: regional correctness, not just replication vocabulary. Read deeper: Multi-Region Split-Brain / Dual Writer.

Likely follow-ups
  • What RPO/RTO would you state? — Be explicit; do not promise magic failover windows without qualification.

Failure Curveballs

Gateway crashes right now—what happens?

Strong answer angle

Strong answer direction: clients reconnect with jitter, routes repopulate, and durable state plus sync close any missed-delivery gap. What interviewer is testing: recovery-path fluency. Read deeper: Connection Gateway Failure.

Likely follow-ups
  • How do you prevent the reconnect storm from becoming the next outage? — Admission control, staged recovery, and pre-provisioned headroom.

Store write succeeded, ACK lost, Bob laptop online, Bob phone offline—walk me through it.

Strong answer angle

Strong answer direction: one logical message, Alice retries with same client ID, Bob laptop may already have the message, Bob phone later recovers it via sync cursor, and delivery semantics remain explicit. What interviewer is testing: can you narrate the core distributed protocol end-to-end. Read deeper: Message Idempotency, Offline Message Sync, and ACK Lost After Durable Write.

Likely follow-ups
  • What if the laptop got the same message twice? — Device deduplicates on stable server message ID.

What if the push provider is down during all this?

Strong answer angle

Strong answer direction: push delay affects wake-up latency for the offline phone, not whether the message exists. What interviewer is testing: source-of-truth discipline. Read deeper: Offline Push Notifications and Push Provider Outage.

Likely follow-ups
  • Would Alice's ACK change because push failed? — No; sender ACK is about durable acceptance, not notification success.

Quick reference

Key takeaways
  • Open with scope and illustrative scale (state them as assumptions), then separate the planes: connection, durable write, delivery, sync, groups, ephemeral presence.
  • Make sends idempotent with a client-generated stable ID, and make ordering a per-conversation sequence; avoid read-before-write dedup, which races.
  • Persist before delivering; treat push as a wake-up hint and reconnect sync (a durable cursor) as the repair path.
  • For groups, name the fan-out strategy and the audience size it fits, and hedge any threshold (such as a member count or sockets per server) as context-dependent.
  • For regions, answer with write authority and RPO/RTO, and say how split-brain is prevented.