Design a scalable real-time chat system

Quick Overview

This question evaluates skills in designing scalable real-time distributed systems, covering API design, message ordering and idempotency, fan-out strategies, storage tiers, indexing, sharding and replication, consistency vs.

Design a scalable real-time chat system

Company: Lyft

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a scalable real-time chat system supporting 1:1 and group messaging. Cover: API design (send, receive, ack), message ordering and idempotency, read receipts and typing indicators, online presence, fan-out architecture (write vs read), storage (hot vs cold, media handling), indexing and data model, replication and sharding strategy, consistency vs availability trade-offs, offline delivery and retries via push notifications, rate limiting and spam/abuse controls, end-to-end encryption considerations, back-of-the-envelope capacity estimates for 100M DAU, monitoring, observability, and disaster recovery.

Quick Answer: This question evaluates skills in designing scalable real-time distributed systems, covering API design, message ordering and idempotency, fan-out strategies, storage tiers, indexing, sharding and replication, consistency vs.

|Home/System Design/Lyft
Lyft logo
Lyft
Sep 6, 2025, 12:00 AM
hardSoftware EngineerOnsiteSystem Design
15
0

System Design: Real-Time Chat (1:1 and Groups)

Context

Design a mobile-first, globally available real-time chat system that supports both 1:1 and group messaging at large scale (target: 100M daily active users). Assume multi-region deployment, clients are primarily mobile apps with intermittent connectivity, and the system must prioritize low latency and high availability.

Requirements

Cover the following areas explicitly:

  1. API design
    • Send, receive/sync, acknowledgments (acks)
    • Message ordering and idempotency semantics
  2. Features
    • Read receipts and typing indicators
    • Online presence
  3. Architecture
    • Fan-out strategy (write vs. read; hybrid if applicable)
    • Storage tiers (hot vs. cold) and media/attachments handling
    • Indexing and data model
    • Replication and sharding strategy
    • Consistency vs. availability trade-offs
  4. Delivery
    • Offline delivery and retries via push notifications
  5. Safety
    • Rate limiting and spam/abuse controls
    • End-to-end encryption considerations (1:1 and groups)
  6. Scale
    • Back-of-the-envelope capacity estimates for 100M DAU
  7. Operations
    • Monitoring, observability, and disaster recovery

Make reasonable assumptions where needed and call them out explicitly.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...