System design: chat app: Answer Guide 2027

System design: chat app: Answer Guide 2027

System design: chat app: Answer Guide 2027

Design a chat app around four pieces: persistent connections (WebSockets) between clients and servers, a message flow that stores then fans out, presence and ordering guarantees, and scaling via sharded chat servers behind a load balancer. In a chat app design interview, the differentiators are real-time delivery mechanics and how you handle ordering, offline messages, and massive group chats.

What This Tests in a Chat app design interview Question

  • Whether you reach for the right primitive: long-lived WebSocket connections, not polling.
  • Whether you think through the hard parts: message ordering, delivery guarantees, and offline users.
  • Whether you can scale it: connection sharding, pub/sub fan-out, and separating hot group chats from 1:1 chats.

How to Answer a Chat app design interview Question

  • Sketch the architecture: clients hold WebSocket connections to chat servers; messages are persisted, then pushed to recipients.
  • Handle the guarantees: sequence IDs per conversation for ordering, acknowledgments for delivery, and an offline inbox for disconnected users.
  • Scale it: shard connections across servers, use pub/sub for fan-out, and treat huge group chats as a broadcast problem.

Example phrasing: "Clients connect over WebSockets to chat servers behind a load balancer. Sending means persisting the message with a sequence ID, then fanning out to recipients' servers via pub/sub; offline users get messages from an inbox on reconnect. Large groups need special broadcast handling to avoid fan-out storms."

Common Mistakes in a Chat app design interview Question

  • Proposing HTTP polling for real-time chat — it signals weak systems knowledge.
  • Ignoring ordering and offline delivery, which are the actual hard problems.
  • Designing only for 1:1 chat and having no answer for 100k-member groups.

Chat apps are a favorite system-design question because everyone uses one but few can architect one. Leading with WebSockets, then nailing ordering and fan-out, shows systems thinking that transfers to every backend interview you will ever take.

Keep Reading

FAQ

How do you start a chat app design interview answer?

Clarify scale and features, then sketch clients, WebSocket servers, message storage, and fan-out — before diving into details.

WebSockets vs polling for chat?

WebSockets: the server pushes messages instantly over a persistent connection; polling wastes resources checking for messages that may not exist.

How do you guarantee message ordering?

Assign sequence IDs per conversation at write time so clients can order and detect gaps regardless of delivery order.

How do offline users receive messages?

Messages persist in per-user inboxes; on reconnect the client fetches everything since its last acknowledged sequence ID.

Preparing for Nomura's interview? Our 2027 Nomura Online Assessment and Video Interview Exact Questions has practice questions and answers — $79 one-time, instant download.