10

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!

Alfred
  • 1,709
  • 8
  • 23
  • 38
  • 1
    You can find documentation that Messager was built over Hbase, and now MyRocks. There's internal systems that would be populating those databases from a queue, yes, but it's not the primary delivery system. https://code.fb.com/core-data/migrating-messenger-storage-to-optimize-performance/ – OneCricketeer Jun 26 '19 at 03:08
  • @cricket_007 thanks for the comments. Yeap, looks like FB uses iris (kafka like) as queue for delivery. – Alfred Jun 27 '19 at 08:01
  • 2
    Good summary post: https://medium.com/@systemizer/lsi-facebooks-iris-system-37c7dcea9dd9 – ivzhh Mar 06 '21 at 05:55

0 Answers0