WhatsApp System Design: Where Do Offline Messages Wait? @KGPTalkie
WhatsApp System Design: Where Do Offline Messages Wait?  @KGPTalkie
Uploaded October 2026 | Updated November 2026, 11 hours ago
Their phone is off. So where is your message waiting? In a System Design Interview you get exactly this question: "Design WhatsApp."

System Design Interview, Day 006. Most candidates say "connect users with WebSockets, and put the messages in a database". Interviewers hear that all day. It won't get you selected. The real questions are: what if the receiver is offline? What if a message arrives twice? And how do the ticks work?

- Fix 1: gateways and a session map. Every online phone keeps one open connection to a gateway server. A session store says which user is on which gateway
- Fix 2: the message path. The server gives the message an ID, stores it, and sends the sender an ack: one grey tick. Then it finds the receiver's gateway and pushes the message. The receiver's phone sends an ack: two grey ticks. When it is read: blue ticks. Every receipt is just a small message going back
- Fix 3: the offline inbox. If the receiver is offline, the message waits in their inbox. When they come back online, the whole backlog is delivered. Once delivered, the message is removed from the server
- Fix 4: order and duplicates. Every chat has a sequence number for its messages, so the order never breaks. And the phone creates its own ID for every message, so if the network drops and the phone retries, the server sees the same ID and doesn't create a duplicate
- Fix 5: groups and media. A group message puts one copy in every member's inbox. A photo or video goes to separate blob storage, and the message carries only its link
- The follow-up that takes your design apart: "One user has the app on a phone, a laptop and a tablet. How does a message reach all three?" Every device keeps its own connection and its own inbox. With end-to-end encryption every device has its own key, so the sending phone encrypts the same message separately for each device. The server just passes the encrypted boxes along. It can't read them

That's the answer that gets you selected: gateway connections and a session map, ticks from IDs and acks, an inbox for offline users, sequence numbers for order, client IDs to stop duplicates, fan-out for groups, blob storage for media, and separate encryption for every device.

Next System Design Interview episode: design YouTube. Comment and tell me: do you keep blue ticks on, or off?

kgptalkie.com

#shorts #SystemDesign #SystemDesignInterview #WhatsApp #MessagingSystem #WebSockets #EndToEndEncryption #BackendInterview #InterviewPrep #SoftwareEngineering #Idempotency #KGPTalkie
WhatsApp System Design: Where Do Offline Messages Wait?What is Jev and Laya Explained: Laya vs Qwen 3.5 Tested on MacBook M5 MaxGitHub Star Scam EXPOSED 🤯 Millions of Fake Stars Sold Online!Claude Opus 5.5 vs GPT-6.1 Sol: Is the Expensive One Better?Ornith 1.5 35B vs Qwen 3.8 27B vs Gemma 4 - Local LLM BenchmarkDo You Know How GLM 5 3 and GLM 5 3 Flash Works? DSA, KDA and KV Cache ExplainedGen AI Interview #12: Temperature - The Dial That Controls LLM Creativity vs Precision 2026!
Laxmi Kant | KGP Talkie |

WhatsApp System Design: Where Do Offline Messages Wait?

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER