Skip to main content

ShardRole

Specify the sharded cluster role of the instance.

Synopsis

[Startup]    ShardRole=n

n can be NODE1, DATA, COMPUTE, or AUTO.

Description

ShardRole specifies the sharded cluster role of an instance, as follows:

  • NODE1 — The instance is configured or deployed as data node 1, which must be the first node in the cluster.

  • DATA — The instance is configured or deployed as a data node other than node 1.

  • COMPUTE — The instance is configured as a compute node.

  • AUTO — The instance’s configuration is determined using a hostname pattern:

    • If the name of its host matches the regular expression specified for ShardMasterRegexp, the instance is configured or deployed as data node 1.

    • If the name of its host does not match the regular expression specified for ShardMasterRegexp:

      • If ShardRegexp is included in the CPF and the name of the instance’s host matches the regular expression it specifies, or ShardRegexp is not included in the CPF, the instance is configured or deployed as a data node other than node 1.

      • If ShardRegexp is included in the CPF and the name of the instance’s host does not match the specified regular expression, the instance is not configured as a cluster member.

Using This Parameter

In conjunction with other parameters, ShardRole can be used to deploy sharded clusters, mirrored or nonmirrored, using the configuration merge feature.

Typically, this parameter would not be changed after deployment of the sharded cluster, unless the instance is removed from the cluster.

See Also

ArbiterURL, to identify the arbiter used by the data node mirror the instance is a member of.

MaxServers and MaxServerConn, which must be greater than or equal to the number of nodes in the sharded cluster the instance is a member of.

ShardRole, to specify the sharded cluster role of the instance.

ShardClusterURL, to specify the node to use as a template when adding an instance to a sharded cluster.

ShardMirrorMember, to specify the role of the instance in a data node mirror.

ShardMasterRegexp, to identify the sharded cluster node to be configured as data node 1 based on hostname.

ShardRegexp, to identify the nodes to be configured as sharded cluster data nodes (other than data node 1) based on hostname.

Feedback