20 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 .

Expand full comment
Ashish Pratap Singh's avatar

thank you!

Expand full comment
Nitish Nandwana's avatar

Designing whatsapp. Typo

Expand full comment
Amith R's avatar

Thank you so much for this post!!

Expand full comment
Techstark's avatar

amazing explanation!!

Expand full comment
Dev's avatar

Too good thanks for sharing

Expand full comment
Amogh Chavan's avatar

Good Read

Expand full comment
PIYUSH SUTHAR 🌱's avatar

Good explanation in easy language

Expand full comment
Deepak Katariya's avatar

Nice one. Appreciation to your quality work.

Expand full comment
Khaldoun El Danaf's avatar

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

Expand full comment
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.

Expand full comment
Anubhav Gupta's avatar

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

Expand full comment
Mohammed Nooh's avatar

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

Expand full comment
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.

Expand full comment
Vijay's avatar

Do we really require the message table? Why this design shows the table which maintains the state of the message?

Expand full comment
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?

Expand full comment
Najim Ali's avatar

Great Article Ashish.

One question for the group message, Is selecting each member active chat server & forward the message will not cause the latency to increase, how do we make sure group message with low latency ?

Expand full comment
Nikhil Komakula's avatar

Hi Ashish, "API Design" section seems to be missing. Was it not included intentionally? Thanks.

Expand full comment
Chethan kodenkiri's avatar

It's amazing mate ✨

Expand full comment
Nitesh Singh's avatar

Really a wonderful article Ashish. I was wondering if you could elaborate WhatsApp communities design. How is it different(if at all) from group chat?

Expand full comment