Ask HN: Database schema for a chat app designed to handle a billion users
I am very curious about how chat messages are stored for a "billion-users" chat app (in SQL databases).Specifically, let's say a user is part of a hundred conversations. When their client app comes online after being offline for a few days, how does the server query all the messages that are pending for this client app?Does the server run one query per conversation? Or is there a fan-out...