이러한 읽기-쓰기 리전 중 하나가 기본 리더 리전으로 지정됩니다. 리더 리전은 각 분할의 기본 리더 리전에 있는 복제본에서 선택됩니다. 최적 복제본이 실패할 경우 기본 최적 리전에 있는 다른 복제본이 자동으로 다음 최적 복제본 역할을 수행합니다. 실제로 최적 복제본은 자체적으로 상태 확인을 실행하며, 비정상 상태를 감지하면 최적 복제본 역할을 사전에 포기할 수 있습니다. 대부분의 경우 기본 리더 리전이 정상 상태로 돌아가면 자동으로 리더를 다시 가정합니다.
쓰기는 먼저 기본 리더 리전에서 처리됩니다. instance/leader_percentage_by_region 모니터링 측정항목을 사용해서 지정된 리전 내에서 복제본 비율을 모니터링할 수 있습니다. 자세한 내용은 Spanner 측정항목을 참조하세요.
두 번째 읽기-쓰기 리전에는 읽기를 제공하고 쓰기 커밋을 위한 응답에 참여하는 추가 복제본이 있습니다. 두 번째 읽기-쓰기 리전에 있는 이러한 추가 복제본은 리더가 될 수 있습니다. 드물긴 하지만 기본 최적 리전의 모든 복제본이 손실되는 경우 두 번째 읽기-쓰기 리전에서 새 최적 복제본이 선택됩니다.
읽기 전용 리전에는 읽기 전용 복제본이 있습니다. 이 복제본은 읽기-쓰기 리전의 외부에 있는 클라이언트에 짧은 지연 시간 읽기를 제공할 수 있습니다.
읽기 전용 복제본은 읽기-쓰기 복제본에서 복제된 데이터 전체 복사본을 유지합니다. 쓰기 커밋을 위한 응답에 참여하지 않으며 쓰기 지연 시간에 영향을 주지 않습니다.
일부 기본 멀티 리전 구성에는 읽기 전용 복제본이 포함됩니다. 커스텀 인스턴스 구성을 만들고, 읽기 전용 복제본을 커스텀 리전 및 멀티 리전 인스턴스 구성에 추가하여 읽기를 확장하고 지연 시간이 짧은 비활성 읽기를 지원할 수도 있습니다.
모든 읽기 전용 복제본에는 컴퓨팅 용량 및 데이터베이스 스토리지 비용이 적용됩니다.
또한 읽기 전용 복제본을 인스턴스 구성에 추가해도 인스턴스 구성의 Spanner SLA는 변경되지 않습니다. 자세한 내용은 읽기 전용 복제본을 참조하세요.
감시 리전
감시 리전에는 쓰기 쿼럼을 구성하고 쓰기에 응답하기 위해 사용되는 감시 복제본이 있습니다. 모든 Spanner 변형에는 다수의 응답 복제본으로 구성된 쓰기 쿼럼이 있어야 합니다(이중 리전 구성의 경우 쿼럼에는 두 리전의 복제본 2개가 필요합니다). 읽기-쓰기 리전을 사용할 수 없게 되는 드문 경우에 감시가 중요해집니다. 이중 리전 및 멀티 리전 구성에만 감시 리전이 포함됩니다. 리더 리전과 응답 복제본에 대한 자세한 내용은 복제를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# Region types\n\nThis page describes the different region types available in Spanner:\n\n- Read-write regions\n- Read-only regions\n- Witness regions\n\nRead-write regions\n------------------\n\nEach [dual-region configuration](/spanner/docs/instance-configurations#dual-region-configurations) has two read-write regions,\neach of which contains two read-write replicas and one witness replica. The\nread-write replicas behave similarly to the read-write replicas of a\nmulti-region configuration.\n\nEach [multi-region configuration](/spanner/docs/instance-configurations#multi-region-configurations) contains two read-write regions,\neach of which contains two [read-write replicas](/spanner/docs/replication#read-write).\n\nOne of these read-write regions is designated the default *leader region*. A\nleader is selected from the replicas in the default leader region for each\nsplit. In the event of a leader replica failure, the other replica in the\ndefault leader region automatically assumes leadership. In fact, leaders run\nhealth checks on themselves and can preemptively give up leadership if they\ndetect they are unhealthy. In most cases, when the default leader region returns\nto a healthy state, it automatically re-assumes the leadership.\n\nWrites are first processed in the default leader region. You can monitor the\npercentage of replicas within a given region by\nusing the `instance/leader_percentage_by_region` monitoring metric. For more\ninformation, see [Spanner metrics](/monitoring/api/metrics_gcp_p_z#gcp-spanner).\n\nThe second read-write region contains additional replicas that serve reads\nand participate in voting to commit writes. These additional replicas in the\nsecond read-write region are eligible to be leaders. In the unlikely event of\nthe loss of all replicas in the default leader region, new leader replicas\nare chosen from the second read-write region.\n| **Key Point:** Place most of your read and write workloads in the default leader region. In the event of the loss of a default leader region, read and write workloads are served from the second read-write region.\n\nYou can configure the leader region of a database by following the instructions\nat [Change the leader region of a database](/spanner/docs/modifying-leader-region#change-leader-region).\nFor more information, see [Configure the default leader region](/spanner/docs/instance-configurations#configure-leader-region).\n\nRead-only regions\n-----------------\n\nRead-only regions contain [read-only replicas](/spanner/docs/replication#read-only), which can\nserve low-latency reads to clients that are outside of the read-write regions.\nRead-only replicas maintain a full copy of your data, which is replicated from\nread-write replicas. They don't participate in voting to commit writes and don't\ncontribute to any write latency.\n\nSome base multi-region configurations contain read-only replicas. You can also\ncreate a custom instance configuration, and add read-only replicas to your\ncustom regional and multi-region instance configurations to scale reads and\nsupport low latency stale reads.\n\nAll read-only replicas are subject to\n[compute capacity and database storage costs](/spanner/pricing).\n\nFurthermore, adding read-only replicas to an instance configuration doesn't\nchange the [Spanner SLAs](/spanner/sla) of the instance\nconfiguration. For more information, see\n[Read-only replicas](/spanner/docs/replication#read-only).\n\n| **Key Point:** Place additional read workloads in read-only regions to reduce latency on read-write regions.\n\nWitness regions\n---------------\n\nA witness region contains a [witness replica](/spanner/docs/replication#witness), which is used\nto form a write quorum and vote on writes. Every Spanner\nmutation requires a write quorum that's composed of a majority of voting\nreplicas (for dual-region configurations, the quorum requires two replicas from\nboth regions). Witnesses become important in the rare event that the read-write\nregions become unavailable. Only dual-region and multi-region configurations\ncontain witness regions. For more information about leader regions and voting\nreplicas, see [Replication](/spanner/docs/replication).\n| **Key Point:** The witness region are system-configured region for voting and achieving write quorums.\n\nWhat's next\n-----------\n\n- Learn more about [Regional, dual-region, and multi-region configurations](/spanner/docs/instance-configurations).\n- Learn more about [Replication](/spanner/docs/replication).\n- Learn more about [Google Cloud geography and regions](/docs/geography-and-regions)."]]