System design interview question
Design a Real-Time Collaborative Document Editor with Conflict Resolution (like Google Docs)
Design a distributed system that enables real-time collaborative editing for documents with 500M users, supporting 50M concurrent documents, and handling 100K concurrent editing sessions at peak. Documents range from 1KB to 100MB, with users distributed globally across 6 continents. The system must guarantee eventual consistency across all replicas, handle network partitions gracefully, resolve concurrent edits from multiple users without data loss, support undo/redo stacks per user, and maintain sub-500ms latency for edit propagation. Users expect offline editing with automatic sync, version history with branch/merge capabilities, and audit trails for compliance. Address how you'd design the operational transformation or CRDT-based architecture, choose between different consistency models, handle tombstoning and compaction, route traffic geographically, and manage state explosion as edit history grows.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.