Design Conversation History Storage for Hundreds of Millions of ChatGPT Users

Last updated: November 29, 2026

Quick Overview

Design the storage layer that persists every ChatGPT conversation, supports branching from edited messages, loads the sidebar instantly, and lets users delete or archive conversations.

OpenAI
System Design
Software Engineer
OpenAI
November 29, 2026
Software Engineer
Onsite
System Design
Medium

0

0

0 solved


Design the storage layer that persists every ChatGPT conversation, supports branching from edited messages, loads the sidebar instantly, and lets users delete or archive conversations.

With hundreds of millions of weekly users, ChatGPT's history store is one of OpenAI's largest OLTP workloads. Interviewers probe whether you model the conversation tree correctly, pick partition keys that keep a user's reads local, and treat deletion as a first-class requirement.

What the Interviewer Expects
  • Model conversations as trees of messages because edits and regenerations create branches
  • Choose a partition key that makes the sidebar and conversation load single-partition reads
  • Estimate storage and write throughput with real numbers
  • Separate hot metadata from bulky content like attachments
  • Handle deletion, retention and temporary chats correctly
Key Topics to Cover
data modeling
partitioning
wide-column stores
tree structures
data retention
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you render the current branch without loading the whole tree?
  • How would you support search across all of a user's conversations?
  • What changes for enterprise workspaces with retention policies set by an admin?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Create conversation, append messages, edit a prior user message (creates a sibling branch), regenerate (sibling assistant message).
  • Sidebar: list of conversations ordered by last update, paginated...
High-Level Design
  • Conversation metadata table: partition by user_id, clustering by updated_at desc, fields conversation_id, title, current_leaf_id, archived, model. This powers the sidebar with one partitio...

Submit Your Answer
Markdown supported