OPTIONS

sh.enableBalancing()

Description

sh.enableBalancing(collection)

Enables the balancer for the specified sharded collection.

The sh.enableBalancing() method has the following parameter:

Parameter Type Description
collection string The namespace of the collection.

Important

sh.enableBalancing() does not start balancing. Rather, it allows balancing of this collection the next time the balancer runs.

For more information on the balancing process, see Manage Sharded Cluster Balancer and Sharded Collection Balancing.