Posts tagged “chat”

  1. How do you build real-time chat?

    WebSockets for the live connection, but the database is the source of truth: messages get a server-assigned sequence per conversation, clients acknowledge what they've seen, and reconnecting clients fetch what they missed. Polling, long polling and server-sent events still have their place.

    · 6 min read · System Design