Suggest an editImprove this articleRefine the answer for “What is sharding (sharding)?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Sharding** is a horizontal-scaling method where a database's data is split into **several independent fragments (shards)**, with each shard stored on **a separate server**: for example, users with IDs 1 to 1,000,000 live on server A, and 1,000,001 to 2,000,000 live on server B. **Key point:** the advantages are speed (each server handles less data), scalability (new servers can be added as data grows), and fault tolerance; the complications are choosing the right shard key, harder queries that span multiple shards, and the need for extra request-routing logic.Shown above the full answer for quick recall.Answer (EN)Image**Sharding** is a horizontal-scaling method where a database's data is split into **several independent fragments (shards)**, with each shard stored on **a separate server**. ### How it works Instead of one huge database holding all the data together, several "mini-databases" get created, each holding only part of the information. For example: - users with IDs 1 to 1,000,000 live on server A, - 1,000,001 to 2,000,000 live on server B, - and so on. ### Why it's needed - **Speed.** Each server handles less data, so queries run faster. - **Scalability.** New servers can be added as data grows, without overloading the old ones. - **Fault tolerance.** If one shard fails, the rest keep working. ### The complications - You need to choose the right shard key (by ID, region, etc.). - Queries that span multiple shards get harder (e.g. aggregates across all users). - Extra logic is needed in the application or middleware to route requests. **Summary:** Sharding is a way to "cut up" a database into independent pieces to increase its performance, scale, and resilience.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.