Tag

ID generation

1 views collected around this technical thread.

Architect
Architect
May 21, 2025 · Databases

Designing Short Numeric ID Generation Using MySQL Auto‑Increment and Segment Allocation

The article examines the challenges of generating short, user‑friendly numeric account IDs, evaluates Snowflake and MySQL auto‑increment approaches, discusses deadlock issues with REPLACE INTO, and presents a final segment‑based solution that allocates ID blocks per login server while avoiding waste and concurrency problems.

Database DesignID generationMySQL
0 likes · 12 min read
Designing Short Numeric ID Generation Using MySQL Auto‑Increment and Segment Allocation
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
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 26, 2025 · Backend Development

Design and Implementation of a Non‑Sequential Business Transaction ID Generator

This article explains the design and Java Spring‑Boot implementation of a business transaction ID generator that combines business type, date, random digits and a non‑sequential long integer, discusses database schema, concurrency handling, performance testing, and potential duplication pitfalls.

ID generationJavaSpring Boot
0 likes · 8 min read
Design and Implementation of a Non‑Sequential Business Transaction ID Generator
Test Development Learning Exchange
Test Development Learning Exchange
Jan 13, 2025 · Backend Development

Building a Python Flask Service for Automatic ID Generation

This guide demonstrates how to build a Python Flask-based RESTful service that generates various types of unique identifiers—including UUIDs, timestamps, Redis counters, Snowflake IDs, and random strings—while covering installation, code implementation, API endpoints, error handling, rate limiting, and extensibility considerations.

APIFlaskID generation
0 likes · 7 min read
Building a Python Flask Service for Automatic ID Generation
Zhuanzhuan Tech
Zhuanzhuan Tech
Nov 28, 2024 · Backend Development

Boosting MyBatis-Plus Batch Insert Performance by 2000% with rewriteBatchedStatements and Pre‑Generated IDs

This article explains how to dramatically improve MyBatis-Plus batch insertion speed—up to 2000%—by enabling rewriteBatchedStatements, pre‑generating primary keys to handle foreign‑key relationships, applying proper JDBC batch settings, and using asynchronous multithreaded insertion with optimized connection‑pool and executor configurations.

ID generationJDBCMyBatis-Plus
0 likes · 21 min read
Boosting MyBatis-Plus Batch Insert Performance by 2000% with rewriteBatchedStatements and Pre‑Generated IDs
Sohu Tech Products
Sohu Tech Products
Oct 30, 2024 · Backend Development

Redis Distributed ID Generator with SpringBoot 3.0

The article presents a Redis‑based distributed ID generator for Spring Boot 3.0 that uses an atomic INCR on a Redis string to produce compact, monotonic, globally unique numeric identifiers, synchronizes the maximum value with MySQL on startup, and offers high performance, availability, and low storage overhead.

ID generationRedisSpringBoot
0 likes · 9 min read
Redis Distributed ID Generator with SpringBoot 3.0
IT Services Circle
IT Services Circle
Jul 7, 2024 · Backend Development

Choosing an ID Generator for Distributed Systems: UUID, Snowflake, and NanoID

The article examines the challenges of generating unique identifiers in distributed environments and compares three popular solutions—UUID, Snowflake algorithm, and NanoID—highlighting their structures, performance characteristics, and suitability for different backend use cases.

ID generationNanoIDUUID
0 likes · 6 min read
Choosing an ID Generator for Distributed Systems: UUID, Snowflake, and NanoID
Architect
Architect
Sep 18, 2023 · Databases

Database Sharding: Data Partitioning Strategies, Challenges, and Practical Solutions

The article explains why relational databases become performance bottlenecks at large scales, introduces vertical and horizontal sharding techniques, discusses their advantages and drawbacks, and provides detailed guidance on handling distributed transactions, joins, pagination, global primary keys, and ID generation strategies.

ID generationShardingdatabase partitioning
0 likes · 24 min read
Database Sharding: Data Partitioning Strategies, Challenges, and Practical Solutions
vivo Internet Technology
vivo Internet Technology
Jun 28, 2023 · Backend Development

Design and Implementation of Vivo's LuBan Distributed ID Service

The article explains distributed ID concepts and business scenarios, compares nine common generation schemes, and details Vivo’s LuBan service architecture—including three built‑in ID formats, custom SPI extensions, Spring‑Boot SDK usage, performance optimizations, and large‑scale deployment metrics—offering practical guidance for building high‑throughput, globally unique ID systems.

ID generationJavaMicroservices
0 likes · 16 min read
Design and Implementation of Vivo's LuBan Distributed ID Service
macrozheng
macrozheng
Apr 7, 2023 · Backend Development

Designing Scalable Order Systems: Architecture, ID Strategies, and Distributed Transactions

This article explores the comprehensive design of order business systems, covering background considerations, order lifecycle management, technical solutions such as ID generation, parallel and asynchronous processing, timeout handling, distributed transactions, and data strategies like sharding and synchronization.

Data ShardingID generationbackend architecture
0 likes · 12 min read
Designing Scalable Order Systems: Architecture, ID Strategies, and Distributed Transactions
Selected Java Interview Questions
Selected Java Interview Questions
Mar 14, 2023 · Databases

16 Common Redis Use Cases and How to Implement Them

This article outlines sixteen practical Redis usage scenarios—including caching, distributed sessions, locks, ID generation, counters, rate limiting, bitmaps, shopping carts, timelines, message queues, lotteries, likes, tags, filtering, follow relationships, and leaderboards—explaining each concept and providing example code snippets for implementation.

BitmapsCacheDistributed Lock
0 likes · 9 min read
16 Common Redis Use Cases and How to Implement Them
Top Architect
Top Architect
Dec 6, 2022 · Backend Development

Distributed ID Generation: Principles, Requirements, and Common Solutions

The article explains why traditional auto‑increment primary keys are unsuitable for distributed systems, outlines the key requirements for a distributed identifier, and reviews several practical generation schemes—including UUID, database auto‑increment, segment mode, Redis, Snowflake, Baidu UidGenerator, Meituan Leaf, and Didi TinyID—along with their advantages, drawbacks, and sample implementations.

ID generationRedisbackend
0 likes · 13 min read
Distributed ID Generation: Principles, Requirements, and Common Solutions
Architect
Architect
Dec 5, 2022 · Backend Development

Distributed ID Generation: Requirements, Schemes, and Implementations

This article explains why distributed systems need special ID generation, outlines the key requirements such as global uniqueness and monotonicity, and compares various solutions including UUID, database auto‑increment, segment mode, Redis, Snowflake, Baidu UidGenerator, Meituan Leaf, and Didi TinyID.

ID generationRedisbackend
0 likes · 13 min read
Distributed ID Generation: Requirements, Schemes, and Implementations
Wukong Talks Architecture
Wukong Talks Architecture
Nov 15, 2022 · Backend Development

Investigation of Snowflake ID Generation Failures Caused by Clock Rollback and Mitigation Strategies

This article analyzes a production incident where duplicate IDs were generated by the Snowflake algorithm due to server clock rollback, explains the algorithm's structure and pitfalls, and presents several open‑source solutions such as Meituan Leaf, Baidu UidGenerator, and Redis for reliable distributed ID generation.

Clock rollbackID generationNTP
0 likes · 8 min read
Investigation of Snowflake ID Generation Failures Caused by Clock Rollback and Mitigation Strategies
Top Architect
Top Architect
Nov 3, 2022 · Backend Development

Distributed ID Generation Service: Principles, Features, and Common Implementations

The article explains the need for globally unique IDs in various business scenarios, outlines essential service characteristics such as uniqueness, ordering, high availability, and security, and details common technical implementations including Snowflake, Redis auto‑increment, short‑URL encoding, and custom coupon code schemes.

ID generationShort URLcoupon code
0 likes · 18 min read
Distributed ID Generation Service: Principles, Features, and Common Implementations
macrozheng
macrozheng
Jun 24, 2022 · Backend Development

Choosing the Right Distributed ID Generator: UUID, Snowflake, NanoID

This article examines the trade‑offs of common distributed ID generators—UUID, timestamp‑based schemes, Snowflake, and NanoID—highlighting their size, ordering, performance, and security implications to help developers select the most suitable approach for their systems.

ID generationNanoIDUUID
0 likes · 6 min read
Choosing the Right Distributed ID Generator: UUID, Snowflake, NanoID
Top Architect
Top Architect
Feb 22, 2022 · Databases

Database Sharding: Concepts, Global ID Strategies, Partitioning Schemes, and Expansion Solutions

This article explains database sharding fundamentals, including terminology, when to adopt sharding, various global ID generation methods such as auto‑increment, UUID, COMB, and Snowflake, different partitioning strategies, challenges like distributed transactions, and practical expansion and migration solutions.

ID generationShardingdatabase
0 likes · 14 min read
Database Sharding: Concepts, Global ID Strategies, Partitioning Schemes, and Expansion Solutions
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 12, 2022 · Databases

Understanding MySQL Auto-Increment Primary Keys: Allocation, Modes, and Best Practices

This article explains how MySQL allocates auto‑increment IDs, the differences between MySQL versions, the three InnoDB lock modes, scenarios that break ID continuity, what to do when IDs run out, and strategies to hide sequential IDs from malicious crawlers.

Database DesignID generationInnoDB
0 likes · 10 min read
Understanding MySQL Auto-Increment Primary Keys: Allocation, Modes, and Best Practices