Skip to content
Theory · Unique ID generator · lesson 1 of 10

Problem and requirements

Two numbering stamps, node 7 and node 8, print numbers from time, DC, node and counter (41+3+10+9) without checking each other

The prompt goes like this: design an ID generator for all the services of a large company. Whenever a service creates a record — an order, a payment or a message — it needs a new 64-bit numeric ID that no record has ever had. IDs should also sort roughly by the time they were made. Many services on many hosts create them at once, and no single central component may become a bottleneck.

In this lesson

  • Why ask first
  • Functional requirements
  • Non-functional requirements
  • What is out of scope
  • Common mistake
  • Key points