JSON data sharding

You can shard data with HCL OneDB™. Documents from a collection or rows from a table can be sharded across a cluster of database servers, reducing the number of documents or rows and the size of the index for the database of each server. When you shard data across multiple database servers, you also distribute performance across hardware. As your database grows in size, you can scale up by adding more shard servers to your shard cluster.

Documents or rows that are inserted on a shard server are distributed to the appropriate shard servers in a shard cluster based on the sharding schema. Queries on a sharded table automatically retrieve data from all relevant shard servers in a shard cluster. When data is sharded based on a field or column that specifies certain segmentation characteristics, queries can skip shard servers that do not contain relevant data.

A shard cluster of HCL OneDB database servers is a special form of Enterprise Replication. You can create a shard cluster with Enterprise Replication commands or with MongoDB commands.

HCL OneDB shard cluster architecture is very flexible:

  • Shard servers can run on different hardware and operating systems.
  • Shard servers can run different version of HCL OneDB. For example, you can upgrade HCL OneDB on shard servers individually.
  • Shard servers can have high-availability secondary servers from which users can query the sharded table.
To start sharding data:
  1. Prepare shard servers for sharding.
  2. Create a shard cluster.
  3. Define a schema for sharding data against an existing table.