Data & storage · Intermediate · 11 min

Unique IDs at Scale

Compare random IDs with structured IDs and protect generator identity and time.

STEP 1 / 12
Allocate from one counter — isometric concept diagramUniqueness needs an authority and a persistence boundary. Components: 1. Writer A. Logical component or processing boundary; 2. ID allocator. Logical component or processing boundary. Connections: 1. Writer A to ID allocator: Allocate from one counter; 2. ID allocator to Writer A: Reply: ID allocator. Illustrations are conceptual, not deployed capacity or user counts.Writer A → ID allocator: Allocate from one counter1ID allocator → Writer A: Reply: ID allocator2Writer A: Logical component or processing boundary1Writer ALogical component or processingboundaryID allocator: Logical component or processing boundary2ID allocatorLogical component or processingboundary
1Writer A2ID allocator
  1. 1Writer A → ID allocatorRequestAllocate from one counter
  2. 2ID allocator → Writer AReplyReply: ID allocator

Conceptual illustration · figures do not imply user counts, deployed capacity or replica counts.

2 components visible · Writer A + ID allocator highlighted

Orange: request / query · Blue: reply · Purple: event / control · Arrows show direction; speed is illustrative.

You’ll learn

  • Random identity is not an access-control policy.
  • A generator’s inputs must remain distinct under concurrency.
  • Failure handling is part of ID generation.

PUT THE IDEA TO WORK

From learning to practice

RELATED PATTERNS

Explore architecture patterns ↗

Further reading

RFC9562 · UUIDs ↗