bugfree Icon
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course

System Design Question

Design a Real-Time Collaborative Editor

bugfree Icon

Hello, I am bugfree Assistant. Feel free to ask me for any question related to this problem

Functional Requirements:

  • Multiple users can edit the same document at the same time, with changes reflected in real time.
  • Users can create, edit, and delete documents.
  • Users can see who else is currently viewing or editing a document.
  • Basic text formatting (bold, italic, underline, etc.) should be supported.
  • Users can add comments to documents.
  • Each document maintains a version history, allowing users to view or revert to previous versions.
  • User authentication is required to access and edit documents.
  • Access control: document owners can share documents and set permissions (view/edit/comment).

Non-Functional Requirements:

  • Low latency for real-time collaboration (edits should be visible to others within 200ms).
  • High availability: system should target at least 99.9% uptime.
  • Scalability: support up to 1 million daily active users.
  • Data consistency: ensure all users see the same document state after edits.
  • Security: all data in transit and at rest should be encrypted; only authorized users can access documents.
  • Auditability: log all document changes for troubleshooting and compliance.
  • Reasonable performance for documents up to 1MB in size and up to 50 concurrent editors per document.

System Design Diagrams

Zoom In and Out via trackpad or posture