Tag

short IDs

1 views collected around this technical thread.

Architecture Digest
Architecture Digest
May 20, 2025 · Backend Development

Designing Short Numeric Account IDs Using MySQL Auto‑Increment and Segment Allocation

This article explores the problem of generating short, sequential numeric account IDs, evaluates the classic Snowflake algorithm, proposes a MySQL auto‑increment based solution with a dedicated ID‑generation table, analyzes deadlock issues, and finally presents a segment‑based ID allocation scheme that reduces waste and supports scaling.

ID generationMySQLauto-increment
0 likes · 12 min read
Designing Short Numeric Account IDs Using MySQL Auto‑Increment and Segment Allocation
Code Ape Tech Column
Code Ape Tech Column
May 14, 2025 · Databases

Designing Short Numeric ID Generation with MySQL: From Snowflake to Segment Allocation

This article explores the evolution from using the Snowflake algorithm to a MySQL‑based short numeric ID generation scheme, detailing challenges such as long IDs, deadlocks with REPLACE INTO, and presenting a segment‑based solution that allocates ID blocks, tracks unused IDs, and avoids concurrency issues.

ID generationMySQLauto-increment
0 likes · 11 min read
Designing Short Numeric ID Generation with MySQL: From Snowflake to Segment Allocation