Ch. 19 · System Design

System Design IDs and Ordering Requirements

System Design IDs and Ordering Requirements. Learn the reasoning, a practical example, common mistakes and an interview exercise.

~2 min readintermediateupdated Oct 3, 2026

Identifiers need uniqueness within a defined scope. Ordering, unpredictability and compactness are separate properties.

Before you start

You should understand API requests, storage and basic capacity estimates. Begin with a concrete user action and its correctness requirement. Draw data flow and failure boundaries before selecting infrastructure; a technology name by itself does not explain why a design meets the requirement.

The practical goal is to reason through this situation: A distributed ID can be unique without accurately recording business-event order. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.

Step-by-step walkthrough

Step 1: Separate desired properties

Uniqueness, ordering and unpredictability are different requirements.

Step 2: Choose generation scope

Distributed generation must fit collision and operational assumptions.

Step 3: Keep authorization independent

An ID’s obscurity or format is not an access decision.

Worked scenario

A distributed ID can be unique without accurately recording business-event order.

An unpredictable resource ID makes enumeration harder but still requires ownership checks. A time-oriented distributed ID may improve some ordering or index behavior without representing precise business-event chronology. Store the actual event time when needed and explain the identifier’s guarantee under clock or generator failure.

Common mistake

Treating an ID as proof of permission creates an access vulnerability.

Verify the behavior

Test generation boundaries and unauthorized access regardless of identifier knowledge.

Interview exercise

Choose IDs for public resources.

Answer and reasoning

Balance generation, indexing and information exposure, and enforce authorization independently of identifier knowledge.

Continue learning

Compare the scenario with the System Design interview questions and test your understanding with the System Design MCQs. For terminology and implementation details, consult the reference material.

More in System Design

read ✓System Design · hard

System Design: Bloom Filters

Use a Bloom filter to skip lookups with a tiny memory footprint, and understand its false-positive-only guarantee.

~2 min readread →
read ✓System Design · hard

System Design: Idempotent APIs

Make retried requests safe with idempotency keys, store the result per key, and return the original response on a repeat.

~2 min readread →
esc