Design a chat server.
Whether you separate delivery from storage, and whether you can say what happens when the recipient is offline.
System designHard
Who reports being asked this
Meta
What a strong answer does
First bound the product, because “chat server” is not one system. A one-to-one messenger can often fan out on write to two inboxes and keep the write path simple. A thousand-person group, or a Discord-sized channel with millions of members, cannot be treated the same way without exploding write amplification. Ask whether the design covers one-to-one, small groups, large public groups, or all of them, and whether history is permanent, limited, or ephemeral. Group size is the design hinge: it decides whether you materialize per-user inboxes, read from a shared conversation log, or use a hybrid.