PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Temporal

Design a One-to-One Chat System

Last updated: Apr 16, 2026

Quick Overview

This question evaluates a candidate's ability to design scalable, real-time backend architectures for one-to-one messaging, covering competencies in distributed systems, authentication and session management, message delivery semantics, persistence, and operational trade-offs like ordering, fault tolerance, and scalability.

  • medium
  • Temporal
  • System Design
  • Software Engineer

Design a One-to-One Chat System

Company: Temporal

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design a real-time one-to-one chat system. Requirements: - Registered users must authenticate before connecting. - After authentication, clients keep a persistent connection such as a WebSocket to receive messages in real time. - Support sending text messages between two users. - Persist chat history and support delivery to offline users. - Minimize message loss and duplicates, and preserve per-conversation ordering as much as practical. - The system should scale horizontally. Describe the backend architecture, key services, data model, and end-to-end message flow. Also explain: - how authentication and session establishment work, - how connections are routed to the correct server, - how online presence is tracked, - where a message broker such as Kafka would or would not fit, - what consumer latency you would expect from Kafka in a typical production setup, - and how Kafka differs from Redis pub/sub or Redis Streams for this use case.

Quick Answer: This question evaluates a candidate's ability to design scalable, real-time backend architectures for one-to-one messaging, covering competencies in distributed systems, authentication and session management, message delivery semantics, persistence, and operational trade-offs like ordering, fault tolerance, and scalability.

Temporal logo
Temporal
Apr 3, 2026, 12:00 AM
Software Engineer
Technical Screen
System Design
2
0
Loading...

Design a real-time one-to-one chat system.

Requirements:

  • Registered users must authenticate before connecting.
  • After authentication, clients keep a persistent connection such as a WebSocket to receive messages in real time.
  • Support sending text messages between two users.
  • Persist chat history and support delivery to offline users.
  • Minimize message loss and duplicates, and preserve per-conversation ordering as much as practical.
  • The system should scale horizontally.

Describe the backend architecture, key services, data model, and end-to-end message flow. Also explain:

  • how authentication and session establishment work,
  • how connections are routed to the correct server,
  • how online presence is tracked,
  • where a message broker such as Kafka would or would not fit,
  • what consumer latency you would expect from Kafka in a typical production setup,
  • and how Kafka differs from Redis pub/sub or Redis Streams for this use case.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Temporal•More Software Engineer•Temporal Software Engineer•Temporal System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.