While thinking through a system design for real-time chat, I am curious what kind queue whatsapp or FB messenger is using on Server side to deliver the message to recipient. What I was thinking was there is a per-person queue/kafka-topic, so when a new message need to be deliver to user A, the message is enqueue to A's queue.
However, there may be billions of users (FB has 2 billion users), does that mean we need 2 billion queues/topics(in kafka term)? If so, which queue can handle this performantly.
Any comment is welcome!
Thank you!