Tagged articles
snowflake-algorithm
17 articles · Page 1 of 1
This article compares eight distributed ID generation approaches—UUID, database auto-increment, segment mode, Redis, Snowflake, Baidu UidGenerator, Meituan Leaf, and Didi TinyID—detailing their mechanisms, pros, cons, and real-world implementations to help choose the right solution for scalable systems.
baidu-uidgeneratordatabase-auto-incrementdistributed-id
0 likes · 14 min read

This article explains distributed tracing concepts, the OpenTracing standard, and how SkyWalking implements automatic span collection, context propagation, unique trace IDs via Snowflake, and adaptive sampling to minimize performance overhead.
BackendDistributed TracingObservability
0 likes · 13 min read

A production incident caused by a flawed custom Snowflake ID generator with a 31-bit timestamp (24-day cycle), IP-based BusinessId collisions, and unconfigured WorkerId/DataCenterId led to duplicate order IDs; the article analyzes the root causes and recommends mature libraries like Hutool and Baomidou with proper WorkerId assignment strategies.
Hutoolbackend developmentbaomidou
0 likes · 8 min read


XikeOct 8, 2026 · Backend Development
This article details the architecture of short link systems, covering short domain selection, unique ID generation strategies (auto-increment, Redis, Snowflake), Base62 and custom encoding, mapping storage with Redis and databases, 302 redirection flow, cache optimization, anti-enumeration, idempotency, expiration handling, multi-data-center deployment, and click tracking.
Redis cachingbase62http-redirection
0 likes · 15 min read

This article analyzes real-world e-commerce failures to compare Snowflake and Segment ID generation, exposing architectural pitfalls like time rollback, machine ID collisions, and blocking windows, while providing production-ready code patterns and a decision matrix for choosing between ordered consistency and high-throughput availability.
Architecture DesignJavadistributed systems
0 likes · 22 min read

This article walks through implementing Twitter's Snowflake algorithm in Spring Boot for distributed ID generation, covering 64-bit structure, clock drift mitigation strategies (wait, error, historical compensation), pre-generated ID pools with double buffering for 120k QPS, MyBatis-Plus integration, and Meituan Leaf design insights.
MyBatis Plusclock-driftdistributed-id-generation
0 likes · 17 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

This article compares three common distributed ID generation methods—database auto‑increment, UUID, and Snowflake—detailing their architectures, advantages, drawbacks, and ideal use‑cases to help engineers select the most suitable approach for their systems.
auto-incrementbackend developmentsnowflake-algorithm
0 likes · 4 min read

This article explains the concept of API idempotency, when it should be applied, practical design patterns—including database checks, unique transaction IDs, and Snowflake ID generation—and the core principles for balancing reliability and cost in backend services.
API idempotencyJavabackend design
0 likes · 10 min read

This article analyzes why MyBatis-Plus generates duplicate primary keys in clustered Docker/K8S environments due to worker‑id and datacenter‑id collisions, introduces Seata's improved Snowflake algorithm that decouples from the OS clock, explains its implementation with Java code, and shows how to integrate it as a global ID generator to improve database performance and avoid page splits.
Database PerformanceJavaMyBatis Plus
0 likes · 18 min read

A production outage on 2024‑11‑20 was traced to a Snowflake‑based UID generator whose timestamp bits ran out, prompting a detailed post‑mortem that explains the root cause, bit‑allocation analysis, and the steps taken to fix and prevent future ID overflow issues.
UID generatorbackend developmentdistributed-id
0 likes · 9 min read

This guide explains how to integrate the Java‑based Snowflake UIDGenerator into a Spring Boot 2.3 application, covering algorithm fundamentals, RingBuffer optimization, database setup, Maven dependencies, configuration beans, and a test case to generate high‑throughput unique IDs.
JavaUID generatordistributed systems
0 likes · 9 min read


21CTOFeb 16, 2021 · Backend Development
This article explains the fundamentals of distributed ID concepts, compares common generation schemes such as UUID, database auto‑increment, Redis counters, and the Snowflake algorithm, details the Snowflake structure and Java implementation, and reviews open‑source components like Meituan Leaf and Baidu UidGenerator.
backend developmentdistributed-idopen-source
0 likes · 9 min read

This article explains the need for globally unique identifiers in distributed systems, compares common ID generation schemes such as UUID, auto‑increment, Redis counters, and Snowflake, provides a Java implementation of the Snowflake algorithm, and reviews open‑source components like Meituan Leaf and Baidu UidGenerator.
distributed-idopen-sourcesnowflake-algorithm
0 likes · 12 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

This article presents a high-availability global unique ordered ID generation solution, Cantor, which addresses the limitations of UUIDs and auto-increment IDs in distributed systems by combining time-based and node-specific sequences for scalability and performance.
CantorGlobal ID Generationdistributed systems
0 likes · 11 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
