System design interview question
Design a Distributed Document Storage and Versioning System like Google Docs at Scale
Design a real-time collaborative document storage system that supports 500M users with 50M concurrent active documents. The system must handle 100K simultaneous edits per second across geographically distributed regions, maintain full version history with point-in-time recovery, support real-time synchronization of changes across multiple clients with sub-100ms latency, and ensure eventual consistency while preventing conflicting edits. Key constraints include: documents range from 1KB to 100MB, version history retention of 2 years, and the requirement to support complex operations (insertions, deletions, formatting changes) with operational transformation or CRDT-based conflict resolution. Explain how you would architect the storage layer, handle real-time sync, manage version metadata, optimize for read-heavy access patterns, and ensure data durability across regions.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.