Skip to content
Tagged articles

snowflake-algorithm

17 articles · Page 1 of 1
Architect's Guide
Architect's Guide
Nov 17, 2026 · Backend Development

Distributed ID Generation: 8 Strategies from UUID to Snowflake

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
Distributed ID Generation: 8 Strategies from UUID to Snowflake
Top Architect
Top Architect
Oct 13, 2026 · Backend Development

Snowflake ID Collision in Production: Why Custom ID Generators Fail

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
Snowflake ID Collision in Production: Why Custom ID Generators Fail
Xike
Xike
Oct 8, 2026 · Backend Development

Short Link Implementation: Core Algorithms, Base62 Encoding, and 302 Redirection

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
Short Link Implementation: Core Algorithms, Base62 Encoding, and 302 Redirection
Internet Backend Architecture Stack
Internet Backend Architecture Stack
Sep 19, 2026 · Backend Development

Distributed ID Deep Dive: Snowflake vs Segment Mode – Trade-offs, Pitfalls & Production Patterns

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
Distributed ID Deep Dive: Snowflake vs Segment Mode – Trade-offs, Pitfalls & Production Patterns
Xiaolin Talks Programming
Xiaolin Talks Programming
Sep 4, 2026 · Backend Development

Spring Boot High-Concurrency Distributed ID Generation: Snowflake Algorithm, Clock Drift Handling & Performance Optimization

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
Spring Boot High-Concurrency Distributed ID Generation: Snowflake Algorithm, Clock Drift Handling & Performance Optimization
Selected Java Interview Questions
Selected Java Interview Questions
Feb 26, 2026 · Backend Development

Why Your Snowflake‑Like ID Generator May Duplicate IDs Under High Concurrency

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
Why Your Snowflake‑Like ID Generator May Duplicate IDs Under High Concurrency
IT Services Circle
IT Services Circle
Sep 30, 2025 · Backend Development

Why Idempotency Matters: Designing Safe Backend APIs

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
Why Idempotency Matters: Designing Safe Backend APIs
IT Services Circle
IT Services Circle
Dec 9, 2024 · Backend Development

Optimized Snowflake ID Generation with Seata: Solving MyBatis-Plus Duplicate Key Issues

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
Optimized Snowflake ID Generation with Seata: Solving MyBatis-Plus Duplicate Key Issues
Su San Talks Tech
Su San Talks Tech
Nov 25, 2024 · Backend Development

How a Snowflake ID Overflow Crashed Our System and What We Learned

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
How a Snowflake ID Overflow Crashed Our System and What We Learned
21CTO
21CTO
Feb 16, 2021 · Backend Development

Mastering Distributed ID Generation: Concepts, Algorithms, and Open‑Source Solutions

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
Mastering Distributed ID Generation: Concepts, Algorithms, and Open‑Source Solutions
Architecture Digest
Architecture Digest
Jan 30, 2021 · Backend Development

Distributed ID Concepts, Implementation Schemes, and Open‑Source Solutions

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
Distributed ID Concepts, Implementation Schemes, and Open‑Source Solutions
21CTO
21CTO
Jan 19, 2021 · Backend Development

Why We Shifted Away from Database‑Generated IDs to 64‑Bit Domain IDs

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
Why We Shifted Away from Database‑Generated IDs to 64‑Bit Domain IDs
Manbang Technology Team
Manbang Technology Team
Sep 28, 2018 · Backend Development

Global Unique Ordered ID Generation in Distributed Systems

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
Global Unique Ordered ID Generation in Distributed Systems