Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-id-generator

Distributed Unique ID Generator Internals (Snowflake, UUIDv7 & HLC)

6 COMPONENTS · 5 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Distributed Unique ID Generator Internals (Snowflake, UUIDv7 & HLC) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-id-generator/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-id-generator)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-id-generator)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-id-generator" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Distributed Unique ID Generator Internals (Snowflake, UUIDv7 & HLC) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["App Microservices"]
  snw_1["Snowflake / UUIDv7 Lib"]
  reg_2[("Worker-ID Lease")]
  clk_3["Monotonic Clock Guard"]
  db_4[("Clustered B-Tree DB")]
  downstream_5["Downstream & OTel"]
  reg_2 -->|"Lease · Lease"| snw_1
  client_0 -->|"1. NextId · RAM"| snw_1
  clk_3 -->|"Guard · Monotoni"| snw_1
  snw_1 -->|"2. Append · SQL"| db_4
  db_4 -.->|"3. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • App MicroservicesSTATELESS
    Needs 100k+ IDs/sec
  • Snowflake / UUIDv7 LibSTATELESS
    41b ts + 10b node + 12b seq
  • Worker-ID LeaseSTATEFUL
    Assigns unique 10-bit workerId
  • Monotonic Clock GuardSTATELESS
    Handles NTP backward skew
  • Clustered B-Tree DBSTATEFUL
    Sequential inserts
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (5)

  1. Worker-ID Lease → Snowflake / UUIDv7 Lib (Lease)[Lease]
  2. App Microservices → Snowflake / UUIDv7 Lib (NextId)[RAM]
  3. Monotonic Clock Guard → Snowflake / UUIDv7 Lib (Guard)[Monotoni]
  4. Snowflake / UUIDv7 Lib → Clustered B-Tree DB (Append)[SQL]
  5. Clustered B-Tree DB → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →