AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

Atlas 고가용성을 위한 지침

고가용성은 인프라 장애, 시스템 유지보수 및 기타 중단 시 지속적인 작업을 보장하고 가동 중단 시간을 최소화하는 애플리케이션의 기능입니다. MongoDB의 기본값 배포서버 아키텍처는 고가용성을 위해 설계되었으며, 데이터 중복성과 자동 페일오버를 위한 내장 기능을 갖추고 있습니다.

고가용성은 재해 복구와 다릅니다. 고가용성은 노드, 구역, 리전 또는 클라우드 공급자 장애와 같은 인프라 장애로부터 보호하며, 자동 페일오버를 통해 데이터 손실 없이 장애 발생 정확한 시점으로 복구(RPO =)하고 0 RTO는 몇 초 이내에 이루어집니다. 재해 복구는 손상 또는 실수로 인한 삭제와 같은 데이터 무결성 문제로부터 보호합니다. 이러한 문제는 백업에서 복원해야 합니다. 재해 복구에 대해 자세히 알아보려면, Atlas 재해 복구 지침을 참조하세요.

이 페이지에서는 중단을 방지하고 구역, 리전 및 클라우드 공급자 장애에 대한 강력한 페일오버 메커니즘을 지원하기 위해 선택할 수 있는 추가 구성 옵션 및 배포서버 아키텍처 개선 사항에 대해 설명합니다.

MongoDB's default deployment architecture is designed for redundancy. Atlas deploys each cluster as a replica set with a minimum of three database instances (also called nodes or replica set members), distributed across separate availability zones within your selected cloud provider regions. Applications write data to the replica set's primary node, and then Atlas replicates and stores that data across all nodes within your cluster. To control the durability of your data storage, you can adjust the write concern of your application code to complete the write only once a certain number of secondaries have committed the write. The default behavior is for data to be persisted on a majority of electable nodes before confirming the action.

다음 다이어그램에서 기본값 3노드 복제본 세트의 복제 작동 방식을 확인하실 수 있습니다.

3노드 복제본 세트에서 복제 프로세스를 보여주는 이미지.
클릭하여 확대

In the event that a primary node in a replica set becomes unavailable due to an infrastructure outage, scheduled maintenance, or any other disruption, Atlas clusters self-heal by promoting an existing secondary node to the role of primary node in a replica set election. This failover process is fully automatic and recovers to the exact moment of failure with no data loss (RPO = 0) in seconds. Operations that were in flight at the time of the failure are retried after the failure if retryable writes are enabled. After a replica set election, Atlas restores or replaces the failing member to ensure that the cluster is returned to its target configuration as soon as possible. The MongoDB client driver also automatically switches all client connections during and after the failure.

다음 다이어그램은 복제본 세트 투표 과정을 보여줍니다.

3노드 복제본 세트에서 자가 치유 프라이머리 투표 프로세스를 보여주는 이미지.
클릭하여 확대

가장 중요한 애플리케이션의 가용성을 개선하기 위해 노드, 리전 또는 클라우드 공급자를 추가하여 각각 구역, 리전 또는 제공자 장애를 견딜 수 있도록 배포서버를 확장할 수 있습니다. 자세한 내용은 아래의 내결함성을 위한 배포서버 패러다임 확장 권장사항을 참조하세요.

다음 권장사항은 배포서버의 가용성을 높이기 위해 수행할 수 있는 추가 구성 옵션 및 배포서버 아키텍처 개선 사항을 설명합니다.

Dedicated, Flex 또는 무료 배포서버 유형에서 사용할 수 있는 범위 클러스터 계층 중에서 선택할 수 있습니다. MongoDB Atlas 의 클러스터 계층 클러스터 의 각 노드 에 사용할 수 있는 리소스(메모리, 저장 , vCPU, IOPS)를 지정합니다. 상위 계층 으로 확장하면 클러스터가 트래픽 급증을 처리하다 기능 향상되고 높은 워크로드에 더 빠르게 응답하여 시스템 안정성이 향상됩니다. 애플리케이션 크기에 권장되는 클러스터 계층 결정하려면 Atlas 클러스터 크기 가이드를 참조하세요.

Atlas also supports auto-scaling to allow the cluster to automatically adjust to spikes in demand. Atlas uses both reactive auto-scaling, which triggers based on current resource usage, and predictive auto-scaling, which proactively scales up eligible clusters before forecasted cyclical demand spikes occur. Automating scaling actions reduces the risk of an outage due to resource constraints. To learn more, see Guidance for Atlas Automated Infrastructure Provisioning.

An Atlas deployment's fault tolerance is the number of replica set members that can become unavailable while your deployment still remains operational. In the event of an availability zone, region, or cloud provider outage, Atlas clusters self-heal by promoting an existing secondary node to the role of primary node in a replica set election. A majority of the voting nodes in a replica set must be operational in order to run a replica set election when a primary node experiences an outage.

부분적인 지역 장애가 발생할 경우 복제본 세트가 프라이머리를 선택할 수 있게 하려면 가용영역이 최소 3개인 리전에 클러스터를 배포해야 합니다. 가용영역은 단일 클라우드 공급자 리전 내에 있는 분리된 데이터 센터 그룹으로, 각 그룹은 자체 전력, 냉각 및 네트워킹 인프라를 갖추고 있습니다. 선택한 클라우드 공급자 리전에서 가용영역을 지원하는 경우, Atlas는 클러스터를 가용영역에 자동으로 분산하여 어느 가용영역에 장애가 발생하더라도 클러스터의 나머지 노드가 여전히 리전 서비스를 지원할 수 있도록 합니다. 대부분의 Atlas가 지원하는 클라우드 공급자 리전에는 최소 3개의 가용영역이 있습니다. 이러한 리전은 Atlas UI에 별 아이콘으로 표시됩니다.

각 클라우드 공급자 가용영역 내에서 기본값 데이터 중복성을 제공합니다.

  • AWS는 AWS 리전에서 최소 3개의 가용영역에 걸쳐 여러 기기에 데이터를 저장합니다.

  • Microsoft Azure 선택한 리전 의 단일 데이터 센터 내에서 데이터를 세 번 복제하는 로컬 중복 저장 (LRS)를 사용합니다.

  • Google Cloud는 리전 의 여러 영역에 데이터를 분산합니다.

For more information about recommended regions, see Cloud Providers and Regions.

가장 중요한 애플리케이션의 내결함성을 더욱 개선하려면 가용영역, 리전 또는 공급자의 장애를 견딜 수 있도록 노드, 리전 또는 클라우드 공급자를 추가하여 배포서버를 확장할 수 있습니다. 투표 선택 가능 노드 최대 7개 및 총 노드 50개까지 홀수로 노드 수를 늘릴 수 있습니다. 또한 클러스터를 여러 리전에 배포하면 더 넓은 지역에 걸쳐 가용성을 향상하고, 전체 리전 장애가 발생하여 프라이머리 리전 내의 모든 가용영역이 비활성화되는 경우 자동 페일오버를 사용할 수 있습니다. 클라우드 공급자의 전체 장애를 견디기 위해 클러스터를 여러 클라우드 공급자에 배포하는 경우에도 동일한 패턴이 적용됩니다.

고가용성, 낮은 지연 시간, 컴플라이언스 및 비용 요구 사항을 균형 있게 충족하는 배포서버를 선택하는 방법은 Atlas 배포서버 패러다임 문서를 참조하세요.

다음 표에서는 다양한 배포서버 패러다임의 RTO 및 RPO 특성을 비교합니다. majority 쓰기 고려 (write concern) 사용하면 이러한 모든 접근 방식을 통해 RPO = 0 (데이터 손실 없음) 및 RTO를 몇 초 만에 달성할 수 있습니다. 단점은 배포서버 복잡성과 클러스터 비용 에 있습니다.

배포 패러다임
실패 시나리오 포함
일반 RTO
RPO(과반수 쓰기 고려 (write concern) 포함)
상대적 복잡성
상대적 클러스터 비용

단일 리전 배포서버 (1 리전 의 3 노드)

단일 리전 내의 노드 또는 AZ 장애

초(자동 페일오버)

0 (데이터 손실 없음)

낮은

$

멀티 리전, 단일 클라우드

한 지역의 AZ 또는 리전 장애

초(자동 페일오버)

0 (데이터 손실 없음)

중간

$$

멀티 리전, 다중 지역

여러 지역에 걸친 리전 또는 지리적 장애

초(자동 페일오버)

0 (데이터 손실 없음)

중간-높음

$$–$$$

멀티 클라우드(2-3 제공자)

한 제공자 에게 영향을 미치는 클라우드 공급자 또는 멀티 리전 장애

초(자동 페일오버)

0 (데이터 손실 없음)

높음

$$$

종료 방지 기능을 활성화해 클러스터가 실수로 종료되지 않도록 하고, 백업에서 복원할 때 가동 중단 시간이 발생하지 않도록 할 수 있습니다. 종료 보호가 활성화된 클러스터를 삭제하려면 먼저 종료 보호를 비활성화해야 합니다. 기본적으로 Atlas는 모든 클러스터에 대해 종료 보호를 비활성화합니다.

종료 보호는 재배포로 인해 새 인프라가 프로비저닝되지 않도록 보장하기 위해 Terraform과 같은 Infrastructure as Code 도구를 사용할 때 특히 중요합니다.

We strongly recommend that you simulate various scenarios that require automatic node failovers to measure your preparedness for such events before you deploy an application to production. With Atlas, you can test primary node failover for a replica set and simulate regional outages for a multi-region deployment.

MongoDB allows you to specify the level of acknowledgment requested for write operations by using write concern. Atlas has a default write concern of majority, meaning that data must be replicated across more than half of the nodes in your cluster before Atlas reports success. Using majority instead of a definite number value like 2 allows Atlas to automatically adjust to requiring replication across fewer nodes if you experience a temporary node outage, allowing writes to continue after automatic failover. This also provides a consistent setting across all environments, so your connection string remains the same whether you have three nodes in a test environment or a larger number of nodes in production.

Atlas supports retryable read and retryable write operations. When enabled, Atlas retries read and write operations once as a safeguard against intermittent network outages and replica set elections in which the application temporarily cannot find a healthy primary node. Retryable writes require an acknowledged write concern, meaning your write concern cannot be {w: 0}.

To avoid resource capacity issues, we recommend that you monitor resource utilization and hold regular capacity planning sessions. MongoDB's Professional Services offers these sessions. See our Resource Capacity Disaster Recovery Plan for our recommendations on how to recover from resource capacity issues.

리소스 사용률에 대한 경고 및 모니터링 모범 사례는 Atlas 모니터링 및 경고 지침을 참조하세요.

We recommend that you run the latest MongoDB version to take advantage of new features and improved security guarantees. You should always ensure that you upgrade to the latest MongoDB major version before your current version reaches end of life.

MongoDB Atlas UI를 사용하는 MongoDB 버전은 다운그레이드할 수 없습니다. 따라서 주요 버전 업그레이드를 계획하고 실행할 때, 업그레이드 과정에서 발생할 수 있는 문제를 방지하기 위해 MongoDB의 Professional Services 또는 기술 서비스에 문의하는 것이 좋습니다.

Atlas는 예정된 유지 관리 동안 한 번에 하나의 노드에 롤링 방식으로 업데이트를 적용하여 가동 시간을 유지합니다. 이 프로세스가 진행되는 동안 유지 관리를 위해 현재 프라이머리가 오프라인으로 전환될 때마다 Atlas는 자동 복제본 세트 투표를 통해 새로운 프라이머리를 선택합니다. 이는 계획되지 않은 프라이머리 노드 장애에 대한 응답으로 자동 페일오버 중에 진행되는 것과 동일한 프로세스입니다.

We recommend that you configure a custom maintenance window for your project to avoid maintenance-related replica set elections during business-critical hours. You can also set protected hours in your maintenance window settings to define a daily window of time in which standard updates cannot begin. Standard updates do not involve cluster restarts or resyncs.

다음 예제에서는 자동화3 위한 Atlas 도구를 사용하여 단일 리전, 노드 복제본 세트/샤드 배포서버 토폴로지 구성합니다.

이러한 예시는 다음을 포함한 다른 권장 구성에도 적용됩니다.

  • 개발/테스트 환경을 위해 클러스터 계층을 M10으로 설정합니다. 애플리케이션 크기에 맞는 권장 클러스터 계층을 알아보려면 클러스터 크기 가이드를 참조하세요.

  • 단일 리전, 3-노드 복제본 세트/샤드 배포 토폴로지

Our examples use AWS, Azure, and Google Cloud interchangeably. You can use any of these three cloud providers, but you must change the region name to match the cloud provider. To learn about the cloud providers and their regions, see Cloud Providers.

참고

Atlas CLI로 리소스를 생성하기 전에 다음을 수행해야 합니다.

개발 및 테스트 환경에서 각 프로젝트에 대해 다음 명령을 실행합니다. 다음 예시에서는 ID와 이름을 사용자의 값으로 변경합니다.

참고

다음 예시에서는 개발 및 테스트 환경에서 비용을 관리하는 데 도움이 되는 자동 확장을 사용하지 않습니다. 스테이징 및 프로덕션 환경에서는 자동 확장을 활성화해야 합니다. 자동 확장을 활성화하는 예시는 '스테이징 및 프로덕션 환경' 탭을 참조하세요.

atlas clusters create CustomerPortalDev \
--projectId 56fd11f25f23b33ef4c2a331 \
--region EASTERN_US \
--members 3 \
--tier M10 \
--provider GCP \
--mdbVersion 8.0 \
--diskSizeGB 30 \
--tag bu=ConsumerProducts \
--tag teamName=TeamA \
--tag appName=ProductManagementApp \
--tag env=dev \
--tag version=8.0 \
--tag email=marissa@example.com \
--watch

For more configuration options and info about this example, see the atlas clusters create command.