Sharding
Updated 2026-07-30
Summary
A database shard, or simply a shard, is a horizontal partition of data within a database or search engine. Each shard may be held on a separate database server instance in order to spread across multiple servers. Some data in a database may remain present in all shards, while other data is stored in...
Definition
When a database becomes too large for a single machine to handle, it is horizontally split into multiple independent shards, each storing a portion of the data and distributed across different servers. Scaffold use: - Infinite scalability: As a company grows, don't try to have one CEO manage everything (single-machine bottleneck). "Shard" the company into multiple independent business units (Amoeba/divisions), each responsible for its own profit and loss, achieving horizontal scaling.
Introduction
How to use
- Infinite scalability: As a company grows, don't try to have one CEO manage everything (single-machine bottleneck). "Shard" the company into multiple independent business units (Amoeba/divisions), each responsible for its own profit and loss, achieving horizontal scaling.
Mechanism
Horizontal sharding distributes data rows to different physical nodes based on a shard key (e.g., modulo of user ID), with each node responsible for a subset. The mechanism is "divide and conquer + shared-nothing"—a single node failure or capacity limit does not affect the whole, and scaling is achieved by adding nodes (horizontal scaling).
Practice
In progress 0/4Practice this model in one real situation:
Cases
- MongoDB/MySQL database and table sharding; company "sharding" into Amoeba/divisions each responsible for profit and loss.
Common pitfalls
- Poor shard key selection leads to data skew (one shard overheated); cross-shard joins/transactions are complex and slow; treating shards as backups (requires separate replication).
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Shard_%28database_architecture%29verified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS