Tagged articles
id-generation
87 articles · Page 1 of 1
This article analyzes short-link ID generation systems, comparing Redis INCR, database auto-increment, Leaf-segment, and Snowflake approaches, covering Base62 capacity planning, segment allocation with audit tables, dual-buffer prefetching, cache consistency for immediate readability, failure recovery protocols, and observability requirements for production-grade reliability.
Cache Consistencybase62database sharding
0 likes · 36 min read

This article walks through the Snowflake algorithm for distributed ID generation, detailing its timestamp, workerId and sequence fields, handling clock rollback and sequence overflow, and provides a complete Java implementation with integration examples for Hutool and MyBatis‑Plus, including configuration and test code.
HutoolJavaMyBatis Plus
0 likes · 28 min read

The article explains why sharding a table requires a global unique ID, outlines six major ID generation strategies, compares their performance, ordering, dependencies and suitable scenarios, and provides practical guidance for choosing the right solution in production environments.
Meituan LeafMySQL auto‑incrementRedis INCR
0 likes · 15 min read


XikeAug 7, 2026 · Databases
By embedding a shard identifier (“gene”) into the low bits of a business ID generated via Redis INCR or similar sequencers, the article shows how to achieve direct table routing without broadcast queries or extra mapping tables, detailing the algorithm, implementation, integration with Snowflake and Leaf, and common pitfalls.
JavaLeafRedis
0 likes · 11 min read

The article examines the drawbacks of using Snowflake for generating short numeric user IDs, details a MySQL auto‑increment based approach, reveals deadlock problems with REPLACE INTO, evaluates alternative schemes, and presents a final sharding‑friendly short‑ID design that meets performance and usability requirements.
MySQLShardingSnowflake
0 likes · 14 min read

The article examines the limitations of using UUIDs for distributed unique identifiers, compares common alternatives such as database auto‑increment and Redis, and then details the Snowflake algorithm’s structure, implementation, advantages, and drawbacks for high‑performance ID generation.
JavaRedisSnowflake
0 likes · 15 min read

The article dissects Claude Code’s task architecture, explaining the 7‑type TaskType union, the 9‑character prefixed ID scheme, the TaskStatus state machine, guard functions, incremental output handling, a minimal kill‑only interface, and a stall‑watchdog that together make concurrent Agent debugging both readable and secure.
ConcurrencyTaskTypebackend design
0 likes · 18 min read

When sharding databases, independent auto‑increment IDs can collide, causing data integrity issues; this article explains why the conflict occurs and walks through five practical solutions—including UUID, custom auto‑increment steps, segment mode, Snowflake, and Meituan Leaf—detailing their trade‑offs, performance, and implementation steps.
LeafShardingSnowflake
0 likes · 15 min read

When sharding databases, independent auto‑increment IDs can collide; this article explains why the conflict occurs and evaluates five concrete solutions—UUID, MySQL auto‑increment step, segment allocation, Snowflake algorithm, and Meituan Leaf—detailing their mechanisms, trade‑offs, performance, and suitability.
Meituan LeafMySQLSharding
0 likes · 14 min read

Random UUID primary keys cause severe B‑tree write performance degradation due to low cache locality, while the new UUIDv7 format embeds timestamps for sortable, efficient inserts, and JDK 26 introduces a native API to generate them, offering a practical solution for Java back‑ends.
JDK26UUIDUUIDv7
0 likes · 12 min read

The article analyzes a custom TraceIdGenerator that uses a simple AtomicInteger counter and IP‑based prefix, identifying how its reset logic and CAS competition can cause duplicate IDs in high‑concurrency scenarios, and proposes timestamp checks, larger ranges, retry mechanisms, and true Snowflake implementation as solutions.
Javaatomicintegerhigh concurrency
0 likes · 11 min read

A recent production incident revealed duplicate order IDs caused by a flawed custom Snowflake algorithm; this article reviews the standard Snowflake structure, dissects the custom implementation’s critical mistakes—short timestamp, IP‑based business ID, zeroed worker and data‑center IDs—and offers best‑practice recommendations, including using mature libraries and proper worker‑ID strategies.
JavaSnowflakedistributed systems
0 likes · 7 min read

A recent production incident revealed duplicate order IDs caused by a flawed custom Snowflake implementation; the article reviews the standard Snowflake structure, pinpoints design mistakes such as a 31‑bit timestamp, IP‑based business IDs, and zeroed worker IDs, and offers concrete recommendations and proven library alternatives for safe distributed ID generation.
JavaSnowflakeid-generation
0 likes · 7 min read

A severe production incident caused duplicate order IDs due to a flawed custom Snowflake implementation, prompting a detailed review of the standard algorithm, identification of critical design mistakes, and a set of practical recommendations for safe, scalable ID generation in distributed back‑end systems.
JavaSnowflakeid-generation
0 likes · 8 min read

A recent production incident caused duplicate order IDs due to a flawed custom Snowflake implementation, prompting a deep dive into the standard algorithm, analysis of the mistakes, and a set of best‑practice recommendations for designing robust distributed ID generators.
JavaSnowflakedesign patterns
0 likes · 7 min read

This article compares four major distributed ID generation approaches—database auto‑increment, UUID, Snowflake, and coordination‑service based allocation—detailing their mechanisms, advantages, drawbacks, and suitable scenarios for backend system design.
BackendSnowflakeUUID
0 likes · 5 min read

A recent production outage caused by duplicate order IDs revealed critical flaws in a home‑grown Snowflake‑style ID generator, prompting a detailed review of the standard algorithm, an analysis of the custom implementation’s mistakes, and a set of best‑practice recommendations for safe ID generation in distributed systems.
BackendSnowflakeid-generation
0 likes · 8 min read

A recent production incident revealed that a self‑developed Snowflake‑style ID generator caused duplicate order numbers due to a truncated timestamp, unsafe IP‑based business IDs, and unconfigured worker and data‑center IDs, prompting a detailed analysis of the standard algorithm, the flaws in the custom design, and best‑practice recommendations for robust ID generation.
BackendBest PracticesSnowflake
0 likes · 9 min read

A recent production incident revealed duplicate order IDs caused by a home‑grown Snowflake implementation that misused timestamps, IP‑based business IDs, and unconfigured worker/data‑center IDs, leading to collisions; the article analyzes the flaws, shares lessons, and recommends proven libraries and proper ID‑generation strategies.
BackendBest PracticesJava
0 likes · 7 min read

The article reviews the most common MyBatis‑Plus traps encountered in large‑scale Java services—duplicate Snowflake IDs, batch‑insert reordering, enum storage mismatches, camel‑case mapping errors, auto‑fill loss, and JSON field disappearance—explaining each root cause, illustrating it with real code snippets, and providing concrete solutions to keep production systems stable.
Auto-fillEnum MappingJava
0 likes · 19 min read

This article explores how to replace long UUIDs with short, sequential numeric IDs by evaluating Snowflake, MySQL auto‑increment tables, REPLACE INTO deadlock issues, batch allocation strategies, and a final free‑ID table design that balances performance, simplicity, and low ID waste.
Database DesignMySQLauto-increment
0 likes · 14 min read


ITPUBAug 18, 2025 · Databases
This article explores how to replace long Snowflake IDs with concise numeric account IDs by leveraging MySQL auto‑increment tables, addressing deadlock pitfalls of REPLACE INTO, and evaluating alternative batch‑allocation and sharding strategies before presenting a final free‑ID table design.
Database DesignMySQLauto-increment
0 likes · 15 min read

This article examines the limitations of traditional database‑based ID generation, compares common distributed ID solutions such as UUID, Snowflake, Baidu uid‑generator and Meituan Leaf, and presents a custom strictly incremental ID scheme that combines database segment allocation, Redis caching, and Nacos‑controlled mode switching.
MySQLNacosRedis
0 likes · 11 min read

This article examines the challenges of distributed ID generation, compares common solutions like UUID and Snowflake, and presents a custom approach that combines MySQL segment tables, Redis caching, and Nacos switches to achieve high‑performance, strictly incremental IDs with automatic failover.
MySQLNacosRedis
0 likes · 11 min read

A recent production incident revealed duplicate order IDs caused by a flawed custom Snowflake generator, prompting a deep dive into the standard algorithm, the mistakes in the bespoke version, and practical recommendations for using proven implementations and proper machine‑ID configuration.
Snowflakebackend developmentdistributed systems
0 likes · 7 min read

To replace long UUIDs with short, sequential numeric account IDs, the article explores the limitations of Snowflake’s 64‑bit IDs, evaluates MySQL auto‑increment and REPLACE INTO approaches, identifies deadlock issues, and ultimately proposes a segmented free‑ID table with batch allocation to achieve compact, ordered IDs.
MySQLauto-incrementbatch allocation
0 likes · 14 min read

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.
MySQLauto-incrementid-generation
0 likes · 12 min read

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.
MySQLauto-incrementdeadlock
0 likes · 11 min read

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.
JavaSpring Bootid-generation
0 likes · 8 min read

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.
APIFlaskPython
0 likes · 7 min read

This article examines seven typical challenges that arise after implementing database sharding—such as global ID conflicts, cross‑shard queries, distributed transactions, shard‑key design, data migration, pagination, and operational overhead—and provides practical solutions and code examples to address each issue.
PaginationShardingdatabase scaling
0 likes · 12 min read

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.
JDBCMyBatis Plusbatch insert
0 likes · 21 min read

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.
RedisSpringBootdistributed ID
0 likes · 9 min read

This article explains the core concepts of distributed systems—including the CAP theorem, BASE theory, message‑queue challenges, Redis sentinel issues, sharding strategies, unique ID generation, and distributed transaction patterns—while offering practical guidance to prevent common pitfalls and improve reliability.
CAP theoremMessage QueueSharding
0 likes · 27 min read

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.
SnowflakeUUIDid-generation
0 likes · 6 min read

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.
Horizontal ShardingVertical Shardingdistributed transactions
0 likes · 24 min read

This article explains why single‑database resources hit limits, introduces horizontal and vertical sharding techniques, discusses how to choose effective split keys, and reviews common key‑generation methods such as auto‑increment, UUID, and Snowflake IDs for scalable database architectures.
Horizontal PartitioningSplit KeyVertical Partitioning
0 likes · 8 min read

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.
Javabackend architecturedistributed ID
0 likes · 16 min read


ITPUBJun 4, 2023 · Databases
This article explains why database sharding is needed when performance bottlenecks appear, outlines the criteria and timing for adopting sharding, and provides detailed step‑by‑step guidance on both database‑level and table‑level partitioning, including common pitfalls and solutions.
Horizontal Partitioningdatabase shardingid-generation
0 likes · 13 min read

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 Shardingbackend architecturedistributed transactions
0 likes · 12 min read

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.
BitmapsDistributed LockLeaderboard
0 likes · 9 min read

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.
BackendRedisdistributed ID
0 likes · 13 min read

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.
RedisSnowflakedistributed ID
0 likes · 13 min read

This article explains why distributed ID generation is essential for modern micro‑service architectures, outlines the key requirements such as global uniqueness and monotonicity, and compares popular solutions like UUID, database auto‑increment, segment mode, Redis, Snowflake, Baidu UidGenerator, Meituan Leaf, and Didi TinyID with practical code examples.
BackendRedisSnowflake
0 likes · 13 min read

This article explains why and when to apply database sharding, distinguishes between sharding databases, tables, or both, describes horizontal and vertical splitting, guides key selection and sharding algorithms, covers global ID generation, lists open‑source tools, and discusses the operational challenges introduced by sharding.
Partitioninghorizontal-splittingid-generation
0 likes · 17 min read

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 rollbackNTPSnowflake
0 likes · 8 min read

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.
coupon codeid-generationshort URL
0 likes · 18 min read

This article analyzes the diverse business requirements for unique identifiers—such as order numbers, QR‑code payments, coupons, trace IDs, and short URLs—and compares technical implementations like Redis auto‑increment, Snowflake, and custom base‑62 encoding to help engineers select the most suitable distributed ID generation solution.
backend architecturecoupon codedistributed ID
0 likes · 19 min read

This article explains the three aspects of database sharding—database‑only, table‑only, and both—detailing when to apply each, how to choose sharding keys, common algorithms, ID generation strategies, available open‑source tools, and the new challenges introduced by sharding.
Horizontal ScalingShardingdatabase partitioning
0 likes · 16 min read

This article explains why and how to apply database sharding, introduces key terminology, compares global ID generation methods such as auto‑increment, UUID, COMB and Snowflake, outlines sharding algorithms, discusses challenges like distributed transactions, and presents practical expansion and implementation solutions.
MySQLShardingSnowflake
0 likes · 12 min read

NanoID, a modern alternative to UUID, offers significantly smaller IDs, up to 60% faster generation, stronger security via crypto APIs, customizable alphabets, and broad language support, making it a compelling choice for developers seeking efficient, compact, and secure unique identifiers across various platforms.
JavaScriptSecurityid-generation
0 likes · 8 min read

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.
SnowflakeUUIDdistributed systems
0 likes · 6 min read

Short URLs are essential for many scenarios, and this article explores their components, including domain and path design, and dives into various path generation methods such as hash functions, auto‑increment IDs, distributed Snowflake algorithms, base‑62 encoding, and the trade‑offs between 301 and 302 redirects.
BackendRedirectSnowflake
0 likes · 8 min read

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.
PartitioningShardingid-generation
0 likes · 14 min read

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 DesignInnoDBMySQL
0 likes · 10 min read

This article explains the need for globally unique, high‑performance, and easy‑to‑integrate distributed IDs, outlines their essential characteristics, and compares nine common generation approaches—including UUID, database auto‑increment, segment mode, Redis, Snowflake, Baidu uid‑generator, Meituan Leaf, and Didi TinyID—detailing each method’s advantages and drawbacks.
RedisSnowflakeUUID
0 likes · 20 min read

The article explains the reasons for scaling, outlines hardware and component expansion strategies, introduces the AKF splitting principle for distributed systems, discusses database clustering and distributed ID generation methods such as UUID and Snowflake, and describes elastic scaling challenges and solutions.
Elastic Scalingcapacity planningdistributed systems
0 likes · 14 min read

This article explains why scaling is necessary, outlines hardware and component expansion strategies, introduces the AKF partitioning principle for horizontal and vertical scaling, discusses challenges after splitting, and reviews database clustering and distributed ID generation techniques such as UUID and Snowflake, highlighting their advantages and drawbacks.
Database ClusteringElastic Scalingdistributed systems
0 likes · 15 min read

The article explains why performance optimization has limits and outlines practical scaling methods—including whole‑machine and component upgrades, AKF splitting, database clustering, distributed ID generation (UUID and Snowflake), and elastic scaling—while also discussing the challenges each approach introduces.
Database ClusteringElastic Scalingcapacity planning
0 likes · 14 min read

This article reviews common ID generation strategies—including UUID/GUID, auto‑increment integers, random numbers, short strings, Twitter's Snowflake, and MongoDB ObjectID—compares their advantages and drawbacks, and introduces the rpcxio/did distributed ID service with performance benchmarks.
SnowflakeUUIDid-generation
0 likes · 12 min read

This article explains the concept, essential characteristics, and common generation strategies—including database auto‑increment, UUID, Redis, Zookeeper, and Twitter's Snowflake—highlighting their advantages, drawbacks, and practical optimization tips for building reliable distributed systems.
RedisSnowflakeUUID
0 likes · 12 min read

This article explains Twitter's Snowflake distributed ID algorithm, its 64‑bit structure, advantages and drawbacks, and compares it with Baidu's UIDGenerator and Meituan's Leaf‑Snowflake implementations, helping readers choose the most suitable unique‑ID solution for their backend systems.
BackendSnowflakeUnique ID
0 likes · 5 min read

This article explores core concepts, ID design, read/write fan-out, push‑pull models, and industry implementations for large‑scale instant messaging systems, discussing trade‑offs in message diffusion, unique identifier strategies, real‑time delivery, ordering, unread counts, multi‑device sync, and deployment considerations.
Real-time Messagingid-generationinstant messaging
0 likes · 23 min read

This article explains why database performance bottlenecks arise, outlines criteria for deciding when to shard databases and tables, and provides detailed strategies for SQL tuning, table restructuring, horizontal and vertical splitting, single‑ versus multi‑database sharding, as well as handling cross‑database joins, distributed transactions, pagination, and ID generation.
Horizontal PartitioningSQL TuningVertical Partitioning
0 likes · 12 min read

This article explains what database sharding (splitting databases and tables) is, why it improves performance and availability, how to choose between horizontal and vertical partitioning, design ID generation, handle distributed transactions, migrate data smoothly, and configure Alibaba's TDDL middleware with practical code examples.
Horizontal PartitioningTDDLVertical Partitioning
0 likes · 20 min read


ITPUBFeb 1, 2021 · Databases
The article explains how a team building a SQL Server data catalog decided to decouple persistence by moving ID generation from the database to the domain layer, adopting 64‑bit Snowflake‑style identifiers instead of auto‑increment keys or UUIDs to improve flexibility, scalability, and performance.
Snowflakecqrsid-generation
0 likes · 6 min read


21CTOJan 19, 2021 · Backend Development
The article explains how our team, while building a SQL Server data catalog, adopted decoupling principles to avoid coupling business logic to a specific database, opting for domain‑generated 64‑bit IDs instead of database‑generated keys, and discusses the benefits of Snowflake‑style ID generators.
64-bit integerSQL Serverdistributed systems
0 likes · 6 min read

The article explains how decoupling persistence from a specific database engine and moving ID generation to the domain layer using 64‑bit integer identifiers—leveraging the Twitter Snowflake algorithm and the IdGen library—improves scalability, reduces coupling, and avoids the storage overhead of UUIDs.
64-bit integerbackend architecturedatabase decoupling
0 likes · 6 min read

This article reviews various ID generation methods—including UUID/GUID, auto‑increment integers, random numbers, Snowflake, and MongoDB ObjectID—explains their advantages and drawbacks, and introduces the rpcxio/did distributed ID service with performance benchmarks and deployment considerations.
SnowflakeUUIDdistributed systems
0 likes · 12 min read

Sharding splits a single database into multiple servers to improve performance, covering vertical and horizontal partitioning, middleware options, and key challenges such as distributed transactions, cross‑node joins, ID generation, pagination, routing transparency, and choosing between frameworks or custom solutions.
Shardingdatabase partitioningdistributed transactions
0 likes · 16 min read

This article explains the distributed‑timestamp global sequence in Dble, detailing its 63‑bit ID structure, the required Zookeeper and configuration file settings, schema and server adjustments, and step‑by‑step commands to create a table, insert data, and verify that the generated IDs correctly encode instance, cluster, and timestamp information.
Database MiddlewareDistributed Timestampglobal sequence
0 likes · 7 min read

This article reviews common unique identifier generation techniques—including database auto‑increment, UUID, Redis counters, Snowflake, Zookeeper, and MongoDB ObjectId—detailing their advantages, drawbacks, and practical implementation examples with C# code snippets.
C++RedisSnowflake
0 likes · 14 min read

This article reviews common system‑wide unique ID generation techniques—including database auto‑increment, UUIDs, Redis counters, Twitter's Snowflake, Zookeeper sequences, and MongoDB ObjectId—detailing their advantages, drawbacks, optimization tips, and providing C# code examples for implementation.
Unique IDcsharpdistributed-systems
0 likes · 15 min read

After splitting a database into multiple shards, generating globally unique primary keys becomes essential, and this article examines various solutions—including auto‑increment IDs, sequence steps, UUIDs, timestamp concatenation, and the Snowflake algorithm—detailing their advantages, drawbacks, and suitable scenarios.
Primary KeyShardingSnowflake
0 likes · 11 min read

This article introduces the "Big Data Mastery" series and outlines practical solutions for three frequent distributed system challenges—distributed locks, distributed transactions, and distributed ID generation—while highlighting open‑source tools and key design requirements.
Distributed Lockdistributed systemsdistributed transaction
0 likes · 3 min read


ITPUBMay 28, 2018 · Databases
This article explains why and how relational databases should be sharded, covering vertical and horizontal partitioning techniques, common pitfalls such as distributed transactions and join queries, and practical guidelines for deciding when to split data and which tools to use.
Horizontal PartitioningShardingVertical Partitioning
0 likes · 22 min read

This article explores the challenges of generating globally unique, trend‑ordered IDs in distributed systems, compares database auto‑increment, UUID and ID‑grouping approaches, explains Twitter's Snowflake algorithm, provides a full Java implementation with Base62 conversion utilities, and introduces the Vesta ID‑generator framework.
JavaSnowflakebase62
0 likes · 16 min read

This article explains why monolithic applications need to be split, outlines the preparatory steps for understanding business complexity and defining service boundaries, and provides detailed practical guidance on database vertical and horizontal splitting, global ID generation, migration, cut‑over strategies, consistency, and post‑split stability.
BackendConsistencydatabase-splitting
0 likes · 17 min read

This article examines the requirements for globally unique IDs in distributed systems, compares classic generation schemes such as UUID, Flickr, Snowflake and TDDL, and details a customized Snowflake‑based implementation with ZooKeeper‑managed worker IDs, clock‑rollback handling, deployment optimizations, and JVM tuning to achieve high performance and reliability.
BackendHigh AvailabilitySnowflake
0 likes · 15 min read

This article presents a distributed ID generation scheme that leverages existing Redis infrastructure and implements a Snowflake-like algorithm to generate unique IDs without requiring separate deployment.
backend developmentid-generationregistration mechanism
0 likes · 10 min read

Meituan’s Leaf system merges segment‑based caching with Snowflake‑style bit fields to deliver globally unique, trend‑increasing 64‑bit IDs at ultra‑low latency, using double‑buffered DB segments, master‑slave MySQL replication, Zookeeper‑assigned worker IDs, and clock‑rollback safeguards, achieving ~50 k QPS and 1 ms 99.9th‑percentile response across billions of daily IDs.
BackendHigh AvailabilityLeaf
0 likes · 18 min read


ITPUBFeb 10, 2017 · Backend Development
This article explains the challenges of generating globally unique IDs across distributed shards, outlines the requirements for such IDs, and details Twitter's Snowflake algorithm—including its structure, generation process, and clock handling—before exploring three notable Snowflake variants and their trade‑offs.
BackendSnowflakeUnique ID
0 likes · 10 min read

Facing a 200 GB order table that strained performance during flash‑sale spikes, Meituan first vertically split the schema, then horizontally sharded orders by user and merchant IDs using a 32 × 32 hash scheme with embedded timestamp‑based IDs, enabling scalable clusters, flexible migration stages, and simplified queries while preserving transaction integrity.
Horizontal PartitioningVertical Partitioningdatabase sharding
0 likes · 11 min read

This article investigates whether the 13‑digit user IDs used in Chinese car‑license lotteries are truly random, revealing how the ID generation, seed‑based selection, and hidden patterns—especially the influential seventh digit—affect outcomes, and demonstrates that simple linear models can achieve an AUC of around 0.8 in predicting winners, while also discussing the system’s opacity across major cities.
car license lotterydata analysisid-generation
0 likes · 17 min read


21CTOApr 27, 2016 · Databases
This article explains how a rapidly growing order database exceeding 200 GB can be scaled using vertical and horizontal partitioning, various sharding strategies, custom ID generation, migration phases, and practical considerations for transactions and complex queries.
Horizontal PartitioningVertical Partitioningdata migration
0 likes · 9 min read

The article outlines a comprehensive database sharding solution for a massive order system, describing vertical and horizontal partitioning, various sharding strategies, a custom ID scheme, transaction handling, complex query constraints, and a three‑stage data migration plan to achieve long‑term scalability.
Horizontal PartitioningVertical Partitioningdata migration
0 likes · 10 min read

The article details the design and implementation of Albianj's core backend components—including distributed lock considerations, unique ID generators, logging, caching, dynamic configuration, and RESTful services—highlighting their architecture, operational principles, and the practical benefits observed in real-world deployments.
AlbianjCachingConfiguration
0 likes · 22 min read
