25 Comments
User's avatar
Nitish Nandwana's avatar

Very well articulated Ashish keep growing 💗 . The heartbeat of designingvwhatsapp like application resides in message synchronisation. That's why what you explained above acknowledgement and all .

Khursheed's avatar

Thank you, this was a great read.

Amith R's avatar

Thank you so much for this post!!

Techstark's avatar

amazing explanation!!

Dev's avatar

Too good thanks for sharing

Amogh Chavan's avatar

Good Read

PIYUSH SUTHAR 🌱's avatar

Good explanation in easy language

Deepak Katariya's avatar

Nice one. Appreciation to your quality work.

Khaldoun El Danaf's avatar

Wonderful article, I had a question though, how do chat servers communicate between each other when sending messages?

Ashish Pratap Singh's avatar

they are multiple ways they can communicate:

1. Message Queues - Sender's chat server publish messages to receiver's chat server queue

2. gRPC - It might be ideal due to its low latency.

3. HTTP APIs (eg.. REST) - Server handling a user’s message might call another server’s API to forward the message to users connected on that server.

Anubhav Gupta's avatar

I am not sure, Can server 1 send message directly to server2 by websocket ?

Pradeep Bansal's avatar

Nice breakdown! Just a note — WhatsApp doesn’t store all messages on the server; it uses end-to-end encryption with messages stored locally on devices and optionally backed up to Google Drive or iCloud. It stores on the server only temporarily until the message is delivered.

Mohammed Nooh's avatar

i have a minor doubt in the database design, dont we need a receiverId in the messages table

Azhaan Nazim's avatar

first you have taken "Peak Concurrent Connections: Approximately 50 million users connected at peak times." but for bandwidth "With 10 million users connected concurrently during peak times."

am i missing something ?

Rohit's avatar

timestamp-based message_id - can cause hot partition, as at that time everyone is writing to same partition. Combination of timestamp+userID, would be a good key here.

Bayza Elaf's avatar

Nice work! WhatsApp's rise from personal messaging to a business powerhouse is impressive. Its growth and potential as a super app are truly unstoppable.

Surinder's avatar

Great article but I am missing one thing. Conversation and message, none of them have receiver id. When user A sends the message, how does it connect to user B. How does chat server know whom to connect user A?

sugriv lodhi's avatar

Well written! I read the whole article in one go — it kept me engaged throughout and provided great clarity on the mentioned concepts

Thank you Ashish