For Atlas CLI commands that you use to deploy and manage Atlas
clusters on the cloud, you can configure how the cluster handles
resource scaling by using the --autoScalingMode
option.
You can use this option for the following commands to specify whether
the cluster nodes scale together or independently:
The --autoScalingMode
option takes the following values:
atlas setup --clusterName symmetricShardCluster --provider AWS --autoScalingMode clusterWideScaling --projectId 5e2211c17a3e5a48f5497de3 --tier M10
For clusters configured with clusterWideScaling
, the JSON
output looks similar to the following:
{ "clusterType": "SHARDED", "name": "symmetricShardCluster", "diskSizeGB": 0, "replicationSpecs": [ { "id": "internalId", "numShards": 2, "regionConfigs": [ { "electableSpecs": { ... },the "readOnlySpecs": { ... }, ... } ], "zoneName": "string" } ], ... }
To learn more about the output, see the getCluster
endpoint. If you omit the --autoScalingMode
option, the command defaults to
clusterWideScaling
mode.
atlas setup --clusterName asymmetricShardCluster --provider AWS --autoScalingMode independentShardScaling --projectId 5e2211c17a3e5a48f5497de3 --tier M10
For clusters configured with independentShardScaling
, the
JSON output looks similar to the following:
{ "clusterType": "SHARDED", "name": "asymmetricShardCluster", "replicationSpecs": [ { "id": "externalId", "regionConfigs": [ { "electableSpecs": { "diskSizeGB": 10, ... }, "readOnlySpecs": { "diskSizeGB": 10, ... }, } ], "zoneId": "string",// for GET/UPDATE "zoneName": "string" }, ... ] }
The JSON output includes the replicationSpecs
object that describes the properties of a single shard. The
replicationSpecs
elements define the number of shards
instead of the numShards
field. The diskSizeGB
field is
inside each shard's replication_specs.regionConfig
object.
The zoneId
field that identifies the zone for Global cluster
is returned in the output. To learn more about the output, see
the getCluster endpoint.