RavenDB sharding is the way to scale-out RavenDB databases horizontally. The idea is to distribute a single logical database across the RavenDB cluster servers. Unlike replication, where each server contains a complete (replicated) copy of data, RavenDB sharding will distribute data across servers and each server will hold just a portion of the data. RavenDB supports database sharding natively and allows you to split your data across servers in an easy way.
Sharding with RavenDB is as easy as 1-2-3. All you need is a list of connection strings to identify the nodes in the shard cluster. You will also create a shard strategy which is simply a set of instructions that define which node is responsible for what data. Finally, we use the list and the strategy to create a smart client. Let's look at the classes and interfaces that can make this happen.
The ShardStrategy
object allows you to customize different aspects of the sharding behavior, giving you the option of fine grained...