SonicBase. In-memory embedded or distributed streaming sql database

Shards and Replicas

Shards and replicas are fundamental building blocks of the SonicBase cluster.

The data stored in the cluster is split evenly into shards. For example, if you have records 1, 2, 3 and 4, shard 0 would contain records 1 and 2 while shard 1 would contain records 3 and 4. As data is inserted into the cluster it automatically distributed across the shards.

A replica is a full copy of the data stored in a shard. You may have one or more replicas for each shard. You can achieve redundancy and fail-safety if you have 2 or more replicas for a shard. If one replica fails, requests will automatically failover to another replica. Inserts are applied equally to all replicas of a shard. All shards must have the same number of replicas. Adding replicas can increase overall throughput of reads.