Tagged articles
11 articles
Page 1 of 1
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.

AtomicIntegerID generationSnowflake algorithm
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 idempotencySnowflake algorithmbackend 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 PerformanceSeataSnowflake algorithm
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.

Production IncidentSnowflake algorithmUID generator
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.

Snowflake algorithmbackend-developmentdistributed-id
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.

Snowflake algorithmdistributed-idopen-source
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 integerDistributed SystemsDomain-Driven Design
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.

CantorDistributed SystemsGlobal ID Generation
0 likes · 11 min read
Global Unique Ordered ID Generation in Distributed Systems