Tagged articles
Leaf
16 articles · Page 1 of 1

XikeAug 7, 2026 · Databases
By embedding a shard identifier (“gene”) into the low bits of a business ID generated via Redis INCR or similar sequencers, the article shows how to achieve direct table routing without broadcast queries or extra mapping tables, detailing the algorithm, implementation, integration with Snowflake and Leaf, and common pitfalls.
JavaLeafRedis
0 likes · 11 min read

When sharding databases, independent auto‑increment IDs can collide, causing data integrity issues; this article explains why the conflict occurs and walks through five practical solutions—including UUID, custom auto‑increment steps, segment mode, Snowflake, and Meituan Leaf—detailing their trade‑offs, performance, and implementation steps.
LeafShardingSnowflake
0 likes · 15 min read

This article explores common distributed ID generation strategies—including UUID, database auto‑increment, segment allocation, Redis, Zookeeper, Snowflake, and open‑source solutions like Leaf, Tinyid, and Baidu UID‑Generator—detailing their principles, advantages, drawbacks, and implementation examples for high‑performance backend systems.
LeafSnowflakeTinyid
0 likes · 17 min read

This article compares common global ID generation strategies for microservice architectures, covering database‑level solutions like auto‑increment configuration and MyCat + ZooKeeper, as well as application‑level approaches such as UUID, Snowflake, Leaf (segment and Snowflake modes), Redis, and ZooKeeper, with configuration steps, code samples, and pros‑cons.
JavaLeafSnowflake
0 likes · 16 min read

The article surveys common global ID generation strategies for distributed systems—database‑managed approaches like MySQL auto‑increment and MyCat‑Zookeeper, and Java‑based methods such as UUID, Snowflake, Leaf, Redis INCRBY and direct Zookeeper—comparing their trade‑offs and recommending Leaf (segment or Snowflake mode) or MyCat‑Zookeeper for reliable, scalable identifiers.
BackendLeafSnowflake
0 likes · 15 min read

This article reviews eight popular distributed ID generation methods—including UUID, database auto‑increment, Redis INCR, Snowflake, database segment, Meituan Leaf, Didi Tinyid, and Baidu UidGenerator—detailing their principles, code examples, advantages, disadvantages, and practical considerations for choosing the right solution.
LeafRedisSnowflake
0 likes · 11 min read

The article reviews five major distributed unique ID generation methods—including UUID, Redis auto‑increment, database auto‑increment, database segment mode, and Snowflake—explains their principles, advantages, drawbacks, and provides practical integration guides and code examples for Java developers.
JavaLeafSnowflake
0 likes · 14 min read


21CTOJun 6, 2022 · Backend Development
This guide explains how the Leaf distributed ID service, built with Spring Boot, supports segment and Snowflake modes, details its configuration, deployment steps, code examples, and operational considerations for high‑throughput backend systems.
LeafSnowflakeSpring Boot
0 likes · 6 min read

This article introduces five open‑source projects—mpvue for mini‑program development, Walle for Android channel‑package generation, SQLAdvisor for MySQL index optimization, Leaf for distributed ID generation, and Robust for Android hot‑update—detailing their key features, configuration steps, and source repositories.
LeafRobustSQLAdvisor
0 likes · 10 min read

This article introduces several open‑source development tools—including the Vue‑based mini‑program framework mpvue, the Android channel‑packaging utility Walle, the MySQL index advisor SQLAdvisor, the distributed ID service Leaf, and the Android hot‑fix system Robust—detailing their main features, configuration examples, and GitHub project links.
Development ToolsLeafRobust
0 likes · 7 min read

This article introduces several open‑source tools for software architecture—including the Vue‑based mini‑program framework mpvue, the Android channel‑packaging tool Walle, the MySQL index advisor SQLAdvisor, the distributed ID service Leaf, and the hot‑update system Robust—detailing their features, configurations, and GitHub links.
AndroidLeafRobust
0 likes · 7 min read

This article introduces several Meituan‑Dianping open‑source tools—including the mpvue front‑end framework, Walle channel‑packaging plugin, SQLAdvisor index‑optimization utility, Leaf distributed ID service, and Robust hot‑update system—detailing their main features, configuration steps, and source repositories.
DevToolsLeafOpenSource
0 likes · 9 min read

This article explains why Yanxuan needed a distributed ID system, describes the selection of Leaf's segment mode, details architectural optimizations such as double‑buffering and dynamic step adjustment, shares operational safeguards, and outlines the pitfalls and solutions discovered during implementation.
Leafdistributed IDhigh-availability
0 likes · 13 min read

This article details the motivation, design choices, architecture, performance optimizations, and operational lessons learned while implementing a distributed ID generation system using Leaf's segment mode to achieve global uniqueness, high availability, and low latency for large‑scale e‑commerce services.
High AvailabilityJavaLeaf
0 likes · 13 min read

This article explains why distributed IDs are essential, outlines the key requirements for a global unique identifier, and compares nine popular generation strategies—including UUID, database auto‑increment, segment mode, Redis, Snowflake, TinyID, Baidu uid‑generator, and Meituan Leaf—detailing their advantages, drawbacks, and sample implementations.
LeafSnowflakeUID generator
0 likes · 21 min read

Meituan’s Leaf system merges segment‑based caching with Snowflake‑style bit fields to deliver globally unique, trend‑increasing 64‑bit IDs at ultra‑low latency, using double‑buffered DB segments, master‑slave MySQL replication, Zookeeper‑assigned worker IDs, and clock‑rollback safeguards, achieving ~50 k QPS and 1 ms 99.9th‑percentile response across billions of daily IDs.
BackendHigh AvailabilityLeaf
0 likes · 18 min read
