Skip to content

Design a 1:1 Text Messaging Platform

Published 4 October 2026

An Anthropic staff software engineer system design question.

Problem Description

Design a text messaging platform for about 100 million daily active users. The initial scope is deliberately narrow:

  • Only direct (1:1) conversations between two users.
  • Text only.
  • Web client only.

Explicitly out of scope:

  • Group chats
  • Images and video
  • Mobile push notifications

Messages sent to an offline user must be persisted and delivered to them, or fetched by them, once they come back online.

Requirements to cover

  • Message persistence
  • Message ordering
  • Deduplication
  • Low latency
  • Scalability

Sketch of a starting design

  • A gateway in front of app servers that hold the users' WebSocket connections.
  • A message store.
  • A presence service that tracks whether a user is online and which app server they're connected to.

Online recipient: persist the message, acknowledge it to the sender, then route it to the recipient's app server and push it over their existing WebSocket.

Offline recipient: when the client reconnects, it recovers missed messages using per-conversation sequence numbers and its last-seen position.

Follow-ups

The follow-ups went deep into:

  • Database scalability
  • Offline message recovery
  • Ordering
  • Routing messages between app servers
  • Replication lag
  • Traffic spikes
  • Caching
  • Deduplication