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
November 29, 20260
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
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- 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 ProblemsSample 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 byupdated_at desc, fieldsconversation_id, title, current_leaf_id, archived, model. This powers the sidebar with one partitio...