Tagged articles
26 articles
Page 1 of 1
Architect
Architect
Dec 28, 2025 · Databases

How to Scale an Order System: Sharding, ID Generation, and Database Choices

This article walks through the challenges of a growing order system, analyzes current bottlenecks, compares sharding and distributed database products, proposes a unique ID strategy, outlines sharding key selection, presents a migration plan with ShardingSphere‑JDBC, and discusses risks and FAQs for a robust backend architecture.

Distributed TransactionsUnique IDdatabase scaling
0 likes · 18 min read
How to Scale an Order System: Sharding, ID Generation, and Database Choices
JavaScript
JavaScript
Oct 6, 2025 · Frontend Development

Why Timestamp+Random Fails and How to Generate Truly Unique IDs in JavaScript

Generating unique IDs may seem trivial, but common approaches like combining Date.now() with Math.random() or using a simple counter suffer from timestamp precision limits and non‑cryptographic randomness, whereas the modern, standards‑based crypto.randomUUID() provides collision‑free, cryptographically secure identifiers across browsers and Node.js.

JavaScriptSecurityUnique ID
0 likes · 4 min read
Why Timestamp+Random Fails and How to Generate Truly Unique IDs in JavaScript
JavaScript
JavaScript
Jul 14, 2025 · Frontend Development

Why Timestamp+Random Fails and How crypto.randomUUID() Guarantees True Uniqueness

This article explains common pitfalls of generating unique IDs with timestamps and Math.random(), shows why naive counters are unreliable in browsers, and demonstrates the robust, standards‑based solution using the built‑in crypto.randomUUID() method, which offers cryptographic security and near‑zero collision risk.

JavaScriptUnique IDcrypto
0 likes · 5 min read
Why Timestamp+Random Fails and How crypto.randomUUID() Guarantees True Uniqueness
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jan 31, 2024 · Backend Development

Distributed System Unique ID: Characteristics and Implementation Solutions

This article explains the importance of globally unique identifiers in distributed systems, outlines their key characteristics such as global uniqueness, monotonic increase, and security, and compares five implementation approaches—UUID, database auto‑increment, Redis, Zookeeper, and Snowflake—detailing their advantages and drawbacks.

Unique IDuuid
0 likes · 8 min read
Distributed System Unique ID: Characteristics and Implementation Solutions
dbaplus Community
dbaplus Community
Jan 7, 2024 · Backend Development

Mastering Snowflake IDs: Java Implementation, Pitfalls & Solutions

This article explains the Snowflake ID algorithm, its 64‑bit structure, provides a complete Java implementation, discusses common issues such as clock rollback and node ID management, and compares Snowflake IDs with UUIDs while suggesting Baidu's UidGenerator as a robust improvement.

JavaUnique IDdistributed-systems
0 likes · 9 min read
Mastering Snowflake IDs: Java Implementation, Pitfalls & Solutions
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 8, 2023 · Backend Development

Five Distributed Global Unique ID Generation Schemes and Their Comparison

This article explains the concept of distributed global unique identifiers, outlines four essential characteristics of such IDs, and provides a detailed comparison of five generation schemes—UUID, database‑generated IDs, Redis, Zookeeper, and Snowflake—highlighting their advantages, drawbacks, and suitable use cases.

Unique IDredissnowflake
0 likes · 8 min read
Five Distributed Global Unique ID Generation Schemes and Their Comparison
Architecture Digest
Architecture Digest
Apr 3, 2022 · Frontend Development

Why NanoID Is Replacing UUID: Features, Advantages, and Limitations

This article examines NanoID as a modern alternative to UUID, detailing its smaller size, higher speed, stronger security, language support, custom alphabets, lack of dependencies, and compatibility, while also discussing its limitations and future prospects for unique identifier generation in JavaScript projects.

JavaScriptUnique IDnanoid
0 likes · 7 min read
Why NanoID Is Replacing UUID: Features, Advantages, and Limitations
Architecture Digest
Architecture Digest
Sep 28, 2021 · Backend Development

Ensuring Idempotency with Unique IDs: UUID, Snowflake, and Shared Storage Strategies

The article explains why idempotency is essential for reliable services, describes how unique identifiers such as UUIDs and Snowflake-generated IDs can guarantee idempotent operations, and outlines practical storage and query techniques using databases or Redis to prevent duplicate orders, inventory deductions, and payments.

IdempotencyUnique IDdatabase
0 likes · 6 min read
Ensuring Idempotency with Unique IDs: UUID, Snowflake, and Shared Storage Strategies
Wukong Talks Architecture
Wukong Talks Architecture
Aug 13, 2021 · Backend Development

Understanding the Snowflake ID Generation Algorithm and Its Variants (Baidu UIDGenerator, Meituan Leaf‑Snowflake)

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.

BackendID generationUnique ID
0 likes · 5 min read
Understanding the Snowflake ID Generation Algorithm and Its Variants (Baidu UIDGenerator, Meituan Leaf‑Snowflake)
Programmer DD
Programmer DD
Sep 25, 2020 · Backend Development

How to Eliminate Duplicate Order Numbers in High‑Concurrency Java Systems

This article analyzes a real‑world incident where duplicate order IDs appeared under high concurrency, critiques the original Java implementation, demonstrates a concurrency test that exposed the flaw, and presents a revised, thread‑safe solution using AtomicInteger, Java 8 date‑time APIs, and IP‑based suffixes to guarantee uniqueness across multiple instances.

DistributedJavaUnique ID
0 likes · 11 min read
How to Eliminate Duplicate Order Numbers in High‑Concurrency Java Systems
Java Backend Technology
Java Backend Technology
Aug 30, 2020 · Backend Development

How to Generate Collision‑Free Order Numbers in High‑Concurrency Java Apps

The article examines a real‑world incident where duplicate order IDs appeared under high concurrency, analyzes the shortcomings of the original timestamp‑and‑random‑based scheme, and presents a revised Java implementation using thread‑safe counters, Java 8 date‑time APIs, and IP‑based suffixes to reliably produce unique order numbers even in clustered environments.

Distributed SystemsJavaUnique ID
0 likes · 13 min read
How to Generate Collision‑Free Order Numbers in High‑Concurrency Java Apps
Top Architect
Top Architect
Jun 8, 2020 · Backend Development

Ensuring Idempotency with Unique IDs: UUID, Snowflake, and Distributed ID Generation

The article explains why idempotency is essential for reliable services, describes how unique identifiers such as UUIDs, Snowflake IDs, and database‑generated keys can be used to achieve it, and offers practical guidance on shared storage, avoiding unnecessary queries, and handling duplicate requests in distributed systems.

IdempotencyUnique IDdatabase
0 likes · 8 min read
Ensuring Idempotency with Unique IDs: UUID, Snowflake, and Distributed ID Generation
Programmer DD
Programmer DD
May 20, 2020 · Backend Development

Choosing the Right Unique ID Strategy: From Auto‑Increment to Snowflake

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.

ID generationUnique IDcsharp
0 likes · 15 min read
Choosing the Right Unique ID Strategy: From Auto‑Increment to Snowflake
Architecture Digest
Architecture Digest
May 11, 2020 · Backend Development

Ensuring Idempotency in Distributed Systems: Unique ID Generation Strategies

The article explains why idempotency is essential for reliable service calls, discusses using unique identifiers such as UUIDs and Snowflake algorithms, compares centralized and client‑side ID generation, and offers practical storage and query‑optimisation techniques to prevent duplicate orders and resource waste.

Distributed SystemsIdempotencyUnique ID
0 likes · 6 min read
Ensuring Idempotency in Distributed Systems: Unique ID Generation Strategies
21CTO
21CTO
Feb 20, 2020 · Backend Development

How to Choose the Right Global Unique ID Strategy for Distributed Systems

Generating globally unique IDs in distributed systems requires balancing uniqueness, monotonicity, high availability, security, and storage efficiency, and this article compares common solutions—including database auto‑increment, Redis/MongoDB/Zookeeper, UUID versions, and the Snowflake algorithm—detailing their advantages, drawbacks, and practical implementation tips.

BackendUnique IDdistributed-systems
0 likes · 9 min read
How to Choose the Right Global Unique ID Strategy for Distributed Systems
21CTO
21CTO
Dec 6, 2017 · Backend Development

How Ctrip Built a High‑Performance Distributed ID Generator for Millions of Users

This article explains Ctrip's design of a globally unique, high‑concurrency user ID generator for sharded MySQL databases, reviews common industry solutions, and details the final optimized approach that combines a MySQL auto‑increment table with in‑memory segment allocation to achieve millisecond‑level response times.

Distributed SystemsJavaUnique ID
0 likes · 8 min read
How Ctrip Built a High‑Performance Distributed ID Generator for Millions of Users
Architecture Digest
Architecture Digest
Dec 6, 2017 · Backend Development

Design and Implementation of a Distributed Unique ID Generator for User IDs

This article describes the background, requirements, existing industry solutions, and the final optimized implementation of a high‑performance, globally unique user ID generator based on MySQL auto‑increment, Redis, and atomic memory segments, including performance results from production deployment.

BackendUnique IDdistributed-systems
0 likes · 8 min read
Design and Implementation of a Distributed Unique ID Generator for User IDs
Ctrip Technology
Ctrip Technology
Nov 16, 2017 · Backend Development

Design and Implementation of a Distributed Unique ID Generator for Ctrip User Accounts

This article describes Ctrip's design of a distributed, globally unique user ID generator for MySQL migration, covering requirements, evaluation of common approaches such as auto‑increment, UUID, Snowflake and Redis, and detailing the final Flicker‑based solution with segment caching using AtomicLong to achieve high concurrency and reliability.

BackendUnique IDdistributed-systems
0 likes · 9 min read
Design and Implementation of a Distributed Unique ID Generator for Ctrip User Accounts
21CTO
21CTO
Oct 15, 2017 · Backend Development

Mastering Distributed Unique IDs: From Auto‑Increment to Snowflake

This article surveys various distributed unique ID generation techniques—including Oracle auto‑increment, Redis batch allocation, UUID versions, Hibernate and MongoDB strategies, and Twitter’s Snowflake—explaining their structures, trade‑offs, and practical implementation considerations for reliable, collision‑free identifiers.

Unique IDbackend-developmentdistributed-systems
0 likes · 10 min read
Mastering Distributed Unique IDs: From Auto‑Increment to Snowflake
ITPUB
ITPUB
Feb 10, 2017 · Backend Development

How to Generate Globally Unique IDs in Distributed Systems: Snowflake and Its Variants

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.

BackendDistributed SystemsID generation
0 likes · 10 min read
How to Generate Globally Unique IDs in Distributed Systems: Snowflake and Its Variants