mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 08:58:26 +00:00
4cd8149502
https://sonarcloud.io/organizations/iluwatar/rules?open=java%3AS5786&rule_key=java%3AS5786
title, category, language, tags
| title | category | language | tags | ||
|---|---|---|---|---|---|
| Sharding | Behavioral | en |
|
Intent
Sharding pattern means divide the data store into horizontal partitions or shards. Each shard has the same schema, but holds its own distinct subset of the data. A shard is a data store in its own right (it can contain the data for many entities of different types), running on a server acting as a storage node.
Class diagram
Applicability
This pattern offers the following benefits:
- You can scale the system out by adding further shards running on additional storage nodes.
- A system can use off the shelf commodity hardware rather than specialized (and expensive) computers for each storage node.
- You can reduce contention and improved performance by balancing the workload across shards.
- In the cloud, shards can be located physically close to the users that will access the data.
