Tagged articles
5 articles
Page 1 of 1
ITPUB
ITPUB
May 21, 2023 · Databases

Mastering Database Sharding: When, How, and Pitfalls of Partitioning

This article explains the concept, motivations, design methods, common patterns, and trade‑offs of database sharding (both table and database level), offering practical code examples, scalability criteria, and guidance on avoiding over‑engineering while considering alternatives like TiDB.

Hash ShardingPartitioningRange Sharding
0 likes · 19 min read
Mastering Database Sharding: When, How, and Pitfalls of Partitioning
vivo Internet Technology
vivo Internet Technology
Oct 20, 2021 · Databases

Database Sharding Strategies: Common Approaches, Pitfalls, and Best Practices

Effective MySQL sharding requires sustainable, low‑skew designs, favoring hash‑based methods with proper coprime counts, two‑stage partitioning, routing tables, or consistent hashing, while supporting expansion via doubling or flexible consistent‑hash growth to avoid hot spots and uneven data distribution.

Data PartitioningHash Shardingbackend-development
0 likes · 23 min read
Database Sharding Strategies: Common Approaches, Pitfalls, and Best Practices
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
May 13, 2021 · Databases

Why MongoDB’s Unique Index Fails When Index Keys Exceed 1024 Bytes

The article reproduces a MongoDB issue where queries using a hashed shard key return no results and a compound unique index silently accepts duplicate documents, explains that the failIndexKeyTooLong parameter allows oversized index entries to be stored without indexing, and shows how to reproduce and fix the problem.

Hash ShardingMongoDBfailIndexKeyTooLong
0 likes · 34 min read
Why MongoDB’s Unique Index Fails When Index Keys Exceed 1024 Bytes
Java Backend Technology
Java Backend Technology
Mar 11, 2021 · Databases

Combine Hash and Range Sharding to Prevent Hotspots Without Data Migration

This article explains how to split large-scale database tables using vertical and horizontal partitioning, compares hash-modulo and range-based sharding, and proposes a hybrid approach that leverages both methods to balance data distribution, avoid hotspot issues, and eliminate the need for costly data migrations during scaling.

Data MigrationHash ShardingRange Sharding
0 likes · 13 min read
Combine Hash and Range Sharding to Prevent Hotspots Without Data Migration
Programmer DD
Programmer DD
Jul 30, 2019 · Databases

Mastering Database Sharding: When and How to Split Tables and Schemas

This article reviews the complete process of database and table sharding, covering when to shard, range and hash strategies, combining both, data migration challenges, business compatibility, and long‑term archiving to keep MySQL workloads manageable.

Data MigrationHash ShardingRange Sharding
0 likes · 11 min read
Mastering Database Sharding: When and How to Split Tables and Schemas