Architect's Journey
Architect's Journey
Sep 10, 2025 · Databases

Why Taobao Order IDs End with the Same Six Digits: Inside the Gene Method

The article explains why the last six digits of Taobao order numbers are constant, revealing the “gene” method that embeds a hashed user identifier to bind orders to specific shards, thereby improving query performance, ensuring balanced data distribution, and supporting scalability in large e‑commerce systems.

Taobaodatabase designdistributed databases
0 likes · 8 min read
Why Taobao Order IDs End with the Same Six Digits: Inside the Gene Method
Java Backend Full-Stack
Java Backend Full-Stack
Sep 9, 2025 · Backend Development

Why Do the Last Six Digits of Taobao Order IDs Remain Constant?

The article explains how Taobao embeds a user‑specific “gene” in the last six digits of its order numbers, enabling efficient sharding routing, uniform data distribution, and idempotent order handling while maintaining global uniqueness in a large e‑commerce system.

Taobaodatabase routinge-commerce
0 likes · 7 min read
Why Do the Last Six Digits of Taobao Order IDs Remain Constant?
ITPUB
ITPUB
Jan 29, 2023 · Databases

How to Query Sharded Orders Efficiently: Redundant, Index, and Gene Strategies

When order_id is not the sharding key, querying a sharded order table can require scanning every shard, but three techniques—data redundancy, an index table, and embedding shard information into the order_id (gene method)—enable fast, single‑shard lookups.

gene methodindex tableorder query
0 likes · 10 min read
How to Query Sharded Orders Efficiently: Redundant, Index, and Gene Strategies