Docs Menu
Docs Home
/
MongoDB Manual
/ / /

transitionFromDedicatedConfigServer

On this page

  • Definition
  • Syntax
  • Behavior
  • Access Control
  • Example
  • Learn More
transitionFromDedicatedConfigServer

New in version 8.0.

Starting in MongoDB 8.0, you can:

  • Configure a config server to store your application data in addition to the usual sharded cluster metadata. A config server that stores application data is called a config shard.

  • Transition a config server between being a config shard and a dedicated config server.

A cluster requires a config server, but it can be a config shard instead of a dedicated config server. Using a config shard reduces the number of nodes required and can simplify your deployment.

If your application has demanding availability and resiliency requirements, consider deploying a dedicated config server. A dedicated config server provides isolation, dedicated resources, and consistent performance for critical cluster operations.

The transitionFromDedicatedConfigServer command configures a dedicated config server to run as a config shard.

Before you run transitionFromDedicatedConfigServer, connect to mongos and use the admin database.

The sharded cluster must have featureCompatibilityVersion set to at least 8.0.

Command syntax:

db.adminCommand( {
transitionFromDedicatedConfigServer: 1
} )

The transitionFromDedicatedConfigServer command adds the config server as a shard in the cluster. Internally, transitionFromDedicatedConfigServer runs the addShard command. You can see the config shard entry in the admin.system.version collection with shardName: 'config'.

To see a list of the shards in the cluster, run the listShards command.

If you must downgrade the feature compatibility version below 8.0, first run the transitionToDedicatedConfigServer command. For downgrade details, see Downgrade Feature Compatibility Version.

If access control is enabled, the transitionFromDedicatedConfigServer command requires the transitionFromDedicatedConfigServer authorization action for the cluster:

{
resource: { cluster : true },
actions: [ "transitionFromDedicatedConfigServer" ]
}

The clusterManager role has transitionFromDedicatedConfigServer authorization action and can be assigned to a user.

The following example assigns the clusterManager role to a user named testUser:

db.grantRolesToUser(
"testUser",
[ "clusterManager" ]
)

The following example configures a dedicated config server to run as a config shard:

db.adminCommand( {
transitionFromDedicatedConfigServer: 1
} )

Back

splitVector