Sharding: Studio Administration



Creating a sharded database

Create New Database

Create New Database

  1. Database View
    Click to create, view or edit database properties.
  2. Create new database
    This button is available when no database has been created yet.
    Click it to create a new database.
  3. 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

New Database Settings

  1. Name
    Enter the database name.
  2. Replication factor
    Decide the number of replicas the database will have.
    If set to 1, there will be no replication.
  3. Enable sharding
    Click to enable or disable sharding on this database.
  4. Number of shards
    Set the number of shards the database will be comprised of.
  5. 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.
  6. Orchestrator nodes
    Select which nodes can function as orchestrators.
  7. 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.
  8. Create
    Click to create the database.

Database View

After creating a database as explained above, the database will be available here:

Database View

Database View

  1. Expand/Collapse distribution details
    Click to display or hide per-shard database details.

    Expanded Details

    Expanded Details

  2. Encryption status
    Informative icon: notify whether the database is encrypted or not.

  3. Shard storage report
    Click to watch the shard's storage usage.

    Select Shard

    Select Shard

    Select the shard number and its replica node.
    The storage report view will open.

    Storage Report

    Storage Report

  4. Documents view
    Click to view and edit documents.

    Documents View

    Documents View

  5. Indexes view
    Click to open the List of Indexes view.

  6. Backups view
    Click to manage backup tasks and restore existing backups.
  7. 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

Database Group

  1. Add Shard
    Click to add a shard.

    Add 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.

  2. 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

      Add Orchestrator 1

      Click Add node to add an orchestrator.

      Add Orchestrator 2

      Add Orchestrator 2

      Select an available node for the orchestrator and click Add orchestrator (or Cancel).

    • Remove Orchestrator

      Remove Orchestrator

      Remove Orchestrator

      Click Remove to remove the orchestrator functionality from this node.

  3. 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

      Add Shard Replica 1

      Click Add node to add a shard replica.

      Add Shard Replica 2

      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

      Remove Shard Replica 1

      Click Delete from group to remove the shard replica from the database group.

      Remove Shard Replica 2

      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.