Introduction to sharding
Sharding separates large databases into smaller, more easily managed parts called database shards that can be spread across multiple database servers.
In IBM® Sterling Selling and Fulfillment Foundation, a colony is a set of database shards and is determined by a configurable set of attributes.
The following diagrams illustrate how several sharding configurations work.
Sharding configuration 1 (sharding by enterprise)
In this diagram, two Transaction shards, Transaction 1 and Transaction 2, share the same Configuration and Statistics shard.
In this example, Transaction data for two of the enterprises, E1 and E2, resides in the Transaction 1 database, while Transaction data for Enterprise E3 resides in the Transaction 2 database. Master data is shared by all enterprises. You can create a colony to bound the set of enterprises that share the same Transaction shard.
Sharding configuration 2 (sharding by enterprise and seller)
In this diagram, three Transaction shards (Transaction 1, Transaction 2, and Transaction 3) share the same Configuration and Statistics shard.
In this example:
- Transaction data for Enterprise E1 resides in the Transaction 1 database.
- Transaction data for S1 (stores 1-10) of Enterprise E2 resides in the Transaction 2 database.
- Transaction data for S2 (stores 11-20) of Enterprise E2 resides in the Transaction 3 database.
- Master data is shared by all enterprises.
Sharding configuration 3 (sharding by enterprise and seller)
This diagram is very similar to the Sharding Configuration 2 diagram, except that there are two Master databases, Master 1 and Master 2.
In this example:
- Transaction data for Enterprise E1 resides in the Transaction 1 database.
- Transaction data for S1 (stores 1-10) of Enterprise E2 resides in the Transaction 2 database.
- Transaction data for S2 (stores 11-20) of Enterprise E2 resides in the Transaction 3 database.
- Master data for Enterprise E1 resides in the Master 1 database.
- Master data for Enterprise E2 is shared by S1 (stores 1-10) and S2 (stores 11-20) and resides in the Master 2 database.
Additional sharding considerations
Note the following sharding considerations:
- Stores or groups of stores that belong to an enterprise must share the same Master shard. For example, in the Sharding Configuration 3 diagram, stores 1-10 (S1) and stores 11-20 (S2) belong to enterprise E2 and must share the same Master shard, which is Master 2.
- If two enterprises share customer master data or catalog master data, they must also share the same Master shard.
- If a colony has existing Master and Transaction data combined together in one shard, the colony continues to have Master and Transaction data combined, even after upgrades.
- Resharding is not supported in Sterling Selling and Fulfillment Foundation.
- If you have a complex system with multiple shards, the mechanism for data retrieval across shards has to be considered. To optimize order and shipment data search, a search index server for fast retrieval of data is provided.