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

System Design Question

Design a Distributed ID Generator

bugfree Icon

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

Functional Requirements:

  • The system must generate globally unique 64-bit IDs.
  • IDs should be time-sortable (IDs generated later have a higher value).
  • The system should support high throughput for ID generation (e.g., thousands to millions of IDs per second).
  • The ID generation should be distributed across multiple nodes to avoid a single point of failure.
  • The API should be simple: clients request an ID and receive a unique 64-bit integer in response.

Non-Functional Requirements:

  • High availability: The system should remain operational even if some nodes fail.
  • Scalability: The system should be able to scale horizontally to handle increased load.
  • Low latency: ID generation requests should be served quickly (ideally within a few milliseconds).
  • Fault tolerance: The system should be resilient to individual node or network failures.
  • No duplicate IDs: The system must guarantee uniqueness of IDs across all nodes and over time.

System Design Diagrams

Zoom In and Out via trackpad or posture