Guided Lab Brief

Case Study: Real-Time Chat System

Design a WhatsApp-like chat system with WebSocket connections, message queuing, and delivery guarantees.

Overview

Design a WhatsApp-like chat system with WebSocket connections, message queuing, and delivery guarantees.

Real-time chat is one of the most challenging system design problems.

You will build 6 architecture steps that model production dependencies.

You will run 1 failure experiment to observe bottlenecks and recovery behavior.

Success target: Messages delivered in <100ms to online users, queued for offline users, zero message loss.

Learning Objectives

  • Designed a real-time chat system with WebSocket and message queuing
  • Understood presence tracking and connection management
  • Learned about message delivery guarantees for chat
  • Experienced the impact of delivery guarantee choices on user experience

Failure Modes to Trigger

  • Trigger: Change message delivery guarantee to at_most_once to see lost messages

    Observe: At-most-once means messages can be silently lost. Users send 'I love you' and the recipient never receives it. In a chat app, this is unacceptable - 100% delivery is expected.