Problem Statement & Context
How Problem Statement & Context shapes architecture and interviewer follow-ups for Design Typing Indicator.
Design Typing Indicator — product and realtime context
Design a real-time typing indicator for a messaging product (WhatsApp / Slack / Discord scale): when user A composes in conversation C, eligible participants see “A is typing…” within a tight latency budget, without durable storage or chat-history pollution.
Why interviewers ask this
- Ephemeral fan-out — high churn, tiny payloads, loss-tolerant semantics unlike message delivery.
- Privacy & product rules — blocked users, disabled receipts, invisible mode, enterprise policies.
- Thundering herds — every keystroke is not a server write; debounce and coalesce are mandatory.
Scale anchors (stated assumptions)
| Signal | Assumption |
|---|---|
| DAU | 500M |
| Active conversations | 80M concurrent |
| Typing signals (debounced) | ~8 per active minute per typer |
| Peak typing events | ~2.2M events/s global (3× average) |
| Propagation SLA | p99 < 300 ms same region |
Architecture headline
Clients emit typing.start / typing.stop over an existing WebSocket session. A regional Typing Gateway validates membership, applies debounce + TTL, and fan-outs to online recipients via per-user delivery channels (Redis pub/sub → gateway push). No durable DB for typing state — Redis with 5–8 s TTL is enough.
1 public record TypingSignal(String conversationId, String userId, boolean isTyping, long epochMs) {}
1 def typing_key(conversation_id: str, user_id: str) -> str: 2 return f"typing:{conversation_id}:{user_id}"
1 export interface TypingEvent { 2 conversationId: string; 3 userId: string; 4 isTyping: boolean; 5 serverTime: number; 6 }
Why interviewers care
Typing Indicator interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.
Interview checkpoint
Name one failure story for Problem Statement & Context that proves you understand real outages, not happy-path diagrams.
Key Highlights
- •Problem Statement & Context: key interview decision
- •Debounce client and server before fan-out
- •TTL clears ghost typing — no durable store
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "For Problem Statement & Context, I will quantify fan-out before choosing aggregation."
- "I will shed typing before message delivery under overload."