Unread count
Badge count


Question1: Whether to store badge and conversation count separately
Question2: Keep consistency between badge and conversation count
Problems


Solution
Count of unread messages in a thread
Naive solution with SQL

Improve write requests with hash based sharding
Improve read requests with Redis
Avoid notification storm in large group chat
Solution: Aggregate and update

Count of unread message in newsfeed
How is the scenario different?
Idea

Last updated
Was this helpful?