cloud 에서 Atlas cluster를 배포 하고 관리 데 사용하는 Atlas CLI 명령의 경우 --autoScalingMode 옵션을 사용하여 클러스터 리소스 확장 처리하는 방법을 구성할 수 있습니다. 다음 명령에 이 옵션을 사용하여 클러스터 샤드를 함께 확장하다 할지 또는 독립적으로 확장할지 여부를 지정할 수 있습니다.
atlas-deployments-setupatlas-deployments-deleteatlas-deployments-listatlas-deployments-pauseatlas-deployments-start
--autoScalingMode 옵션은 다음 값을 사용합니다.
atlas setup --clusterName symmetricShardCluster --provider AWS --autoScalingMode clusterWideScaling --projectId 5e2211c17a3e5a48f5497de3 --tier M10
clusterWideScaling로 구성된 클러스터의 경우 JSON 출력은 다음과 유사합니다.
{ "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 엔드포인트를 참조하세요.
독립적인 샤드 확장 사용하는 샤딩된 클러스터 클러스터 전체 확장 으로 되돌리려면 다음 절차를 수행하세요.
독립적인 샤드 확장 스키마 조회.
Atlas Administration API Return One 클러스터 from One 프로젝트 엔드포인트에 요청 합니다. 요청 은 샤드 당 하나의 replicationSpecs 항목을 반환합니다.
템플릿 스키마 선택합니다.
replicationSpecs 중에서 대칭 확장 위해 다른 샤드와 일치시킬 샤드를 선택합니다. 선택한 샤드의 regionConfigs에서 다음 속성을 확인합니다.
instanceSizeelectableSpecs,readOnlySpecs또는analyticsSpecs와 같은 각 샤드 역할 에 대해diskSizeGB,ebsVolumeType및diskIOPS또는 다양한 클러스터 공급업체에 해당하는 저장 필드를 사용할 수 있습니다.
성능의 연속성을 보장하려면 가장 높은 계층의 샤드 템플릿으로 선택합니다.
대칭형 replicationSpecs 배열을 구성합니다.
선택한 템플릿 스키마 기반으로 electableSpecs 및 readOnlySpecs 에 대한 각 샤드의 instanceSize 값이 동일한 PATCH 요청 페이로드를 작성합니다.
{ "replicationSpecs": [ { "id": "SHARD_ID_0", "regionConfigs": [ { "providerName": "AWS", "regionName": "US_EAST_1", "zoneName": "Zone1", "electableSpecs": { "instanceSize": "M60", "nodeCount": 3, "diskSizeGB": 2048, "ebsVolumeType": "PROVISIONED", "diskIOPS": 4000 }, "readOnlySpecs": { . . . }, "analyticsSpecs": { . . . } } ] }, { "id": "SHARD_ID_1", "regionConfigs": [ . . . ] }, . . . ] }
기존 샤드의 id 값을 유지해야 합니다. 각 샤드의 계층, 저장 및 디스크 설정을 일치시킵세요.
PATCH.를 적용합니다.
이전에 정의된 페이로드를 사용하여 Atlas Administration API Update One Cluster in One Project 엔드포인트에 요청 합니다. 이렇게 하면 클러스터 에 있는 모든 샤드의 롤링 크기 조정이 시작됩니다.
대칭을 복원 위해 샤드의 크기를 조정한 후에는 2024-10-23 API 리소스 버전 사용으로 되돌릴 수 있습니다. 이 버전은 대칭 replicationSpecs.numShards 모델을 사용합니다.