Sharding: Studio Administration
- This page explains how to create and manage a sharded database using Studio.
-
Learn here how to manage a sharded database using API commands.
-
In this page:
Creating a sharded database
Create New Database
- Database View
Click to create, view or edit database properties. - Create new database
This button is available when no database has been created yet.
Click it to create a new database. - New database
Click to create a new database.
Initiating the creation of a new database as shown above will open the following view:
New Database Settings
- Name
Enter the database name. - Replication factor
Decide the number of replicas the database will have.
If set to 1, there will be no replication. - Enable sharding
Click to enable or disable sharding on this database. - Number of shards
Set the number of shards the database will be comprised of. - Set nodes layout manually
The layout determines which nodes host each shard, and whether nodes can function as orchestrators.
Enable this option to set the layout manually.
Disable to let RavenDB set it for you. - Orchestrator nodes
Select which nodes can function as orchestrators. - Shards replication
Select the nodes that host shard replicas.
The number of nodes available for each shard is determined using the "Replication factor" box at the top. - Create
Click to create the database.
Database View
After creating a database as explained above, the database will be available here:
Database View
-
Expand/Collapse distribution details
Click to display or hide per-shard database details.Expanded Details
-
Encryption status
Informative icon: notify whether the database is encrypted or not. -
Shard storage report
Click to watch the shard's storage usage.Select Shard
Select the shard number and its replica node.
The storage report view will open.Storage Report
-
Documents view
Click to view and edit documents.Documents View
-
Indexes view
Click to open the List of Indexes view. - Backups view
Click to manage backup tasks and restore existing backups. - Manage group
Click to manage the database group (see below).
Database Group
The Database Group view allows you to appoint and dismiss orchestrators and add or remove shards and shard replicas.
Database Group
-
Add Shard
Click to add a shard.Add Shard
Set the shard's replication factor and click Add shard (or Cancel).
The new shard will be added to the database group view. -
Manage Orchestrators
Add or remove orchestrator functionality to cluster nodes.-
Add Orchestrator
This option will be available only if there are still nodes that an orchestrator hasn't been assigned for.Add Orchestrator 1
Click Add node to add an orchestrator.
Add Orchestrator 2
Select an available node for the orchestrator and click Add orchestrator (or Cancel).
-
Remove Orchestrator
Remove Orchestrator
Click Remove to remove the orchestrator functionality from this node.
-
-
Manage Shards
-
Add shard replica
This option will be available only if there are still available nodes for replicas of the selected shard.Add Shard Replica 1
Click Add node to add a shard replica.
Add Shard Replica 2
Select a node for the replica.
If you want, you can also set a mentor node that will replicate the data to the new replica.
Click "Add node" to create the new replica (or Cancel). -
Remove shard replica
Remove Shard Replica 1
Click Delete from group to remove the shard replica from the database group.
Remove Shard Replica 2
Click Soft Delete to stop replication to this node but keep the database files on it.
Click Hard Delete to stop replication to this node and delete database files from it.
Removing a shard is done by removing all its replicas.
Please be careful not to remove files that have no backup and may still be needed.
-