クラウド上の Atlas クラスターの配置と管理に使用する Atlas CLI コマンド の場合、--autoScalingMode
オプションを使用してクラスターがリソーススケーリングを処理する方法を構成できます。このオプションを次のコマンドで使用して、クラスター ノードが一緒に増やすか、個別にスケーリングするかを指定できます。
--autoScalingMode
オプションには次の値があります。
atlas setup --clusterName symmetricShardCluster --provider AWS --autoScalingMode clusterWideScaling --projectId 5e2211c17a3e5a48f5497de3 --tier M10
clusterWideScaling
で構成されたクラスターの場合、JSON出力は次のようになります。
サンプル clusterWithScaling 出力
{ "clusterType": "SHARDED", "name": "symmetricShardCluster", "diskSizeGB": 0, "replicationSpecs": [ { "id": "internalId", "numShards": 2, "regionConfigs": [ { "electableSpecs": { ... },the "readOnlySpecs": { ... }, ... } ], "zoneName": "string" } ], ... }
出力の詳細については、getCluster エンドポイントを参照してください。--autoScalingMode
オプションを省略すると、コマンドはデフォルトで clusterWideScaling
モードになります。
atlas setup --clusterName asymmetricShardCluster --provider AWS --autoScalingMode independentShardScaling --projectId 5e2211c17a3e5a48f5497de3 --tier M10
independentShardScaling
で構成されたクラスターの場合、JSON出力は次のようになります。
サンプル独立したシャードスケーリング出力
{ "clusterType": "SHARDED", "name": "asymmetricShardCluster", "replicationSpecs": [ { "id": "externalId", "regionConfigs": [ { "electableSpecs": { "diskSizeGB": 10, ... }, "readOnlySpecs": { "diskSizeGB": 10, ... }, } ], "zoneId": "string",// for GET/UPDATE "zoneName": "string" }, ... ] }
JSON出力には、単一のシャードのプロパティを記述する replicationSpecs
オブジェクトが含まれます。replicationSpecs
要素は、numShards
フィールドの代わりにシャードの数を定義します。diskSizeGB
フィールドは各シャードの replication_specs.regionConfig
オブジェクト内にあります。グローバルクラスターのゾーンを識別する zoneId
フィールドが出力に返されます。出力の詳細については、getCluster エンドポイントを参照してください。