6. Chat System


Design a system that supports group chat

Functional Requirements
  • Users can send and receive text based messages on their mobile apps
  • All members of a group can see all messages that are sent to that group
Nonfunctional Requirements
  • Message latency should be less than 400ms
  • Groups can have a maximum of 100 people
  • Each message should be less than 50,000 characters long
  • Assume we only support text
  • Encryption not required
  • Messages should never expire
  • Online presence doesn't need to be supported
  • We do not need to support push notifications
  • Each user connection will require 10k of memory
  • We are given a data store containing user profile information that is indexed on a user ID
Estimated Usage
  • 40 Million Daily Active Users
  • 80 Million messages sent per day
  • The read to write ratio is 1:1
  • Smooth usage

Seen this question in a real interview before?

Not all editor features are supported on mobile