[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-21。"],[],[],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)."]]