クラウド上の 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 エンドポイントを参照してください。