现已推出具有 MongoDB 兼容性的 Firestore 企业版!
了解详情。
与 MongoDB 兼容的 Cloud Firestore 位置
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
预配 Cloud Firestore 数据库时,您必须为其选择位置。为减少延迟并提高可用性,请将您的数据存储在需要这些数据的用户和服务附近。
您可以选择在项目中创建多个数据库,每个数据库都有自己的位置设置。
请注意,预配数据库后,您将无法更改其位置设置。
位置类型
您可以将与 MongoDB 兼容的 Cloud Firestore 数据存储在多区域位置或单区域位置。
多区域位置
如果您想要最大限度地提高数据库的可用性和耐用性,请选择多区域位置。
多区域位置由一组定义的区域(其中存储了数据库的多个副本)组成。 每个副本要么是包含数据库中所有数据的读写副本,要么是不保留全部数据但参与复制的见证者副本。
通过在多个区域之间复制数据,即使整个区域丢失,系统也能继续传送数据。在一个区域内,数据会跨可用区复制,因此,即使可用区丢失,系统也能继续在该区域内传送数据。
与 MongoDB 兼容的 Cloud Firestore 支持以下多区域位置:
多区域名称 |
多区域说明 |
读写区域 |
见证者区域 |
eur3 |
欧洲 |
europe-west1 (比利时)、europe-west4 (荷兰) |
europe-north1 (芬兰) |
nam5 |
美国(中部) |
us-central1 (爱荷华)、us-central2 (俄克拉荷马 - 专用 Google Cloud 区域) |
us-east1 (南卡罗来纳) |
nam7 |
美国(中部和东部) |
us-central1 (爱荷华州)、us-east4 (北弗吉尼亚州) |
us-central2 (俄克拉荷马州 - 专用 Google Cloud 区域) |
单区域位置
单区域位置是具体的地理位置,如南卡罗来纳州。单区域位置中的数据会复制到单个区域内的多个可用区。每个单区域位置与其他单区域位置至少相隔 100 英里。
如果您的应用对延迟较敏感,或者您想要与其他 Google Cloud 资源共用位置,请选择单区域位置以降低成本和写入延迟。
与 MongoDB 兼容的 Cloud Firestore 支持以下区域资源位置:
| 区域名称 | 区域说明 |
北美洲 |
| us-west1 | 俄勒冈 |
| us-west2 | 洛杉矶 |
| us-west3 | 盐湖城 |
| us-west4 | 拉斯维加斯 |
|
us-central1
|
艾奥瓦 |
| northamerica-northeast1 | 蒙特利尔 |
|
northamerica-northeast2
|
多伦多 |
|
northamerica-south1
|
克雷塔罗 |
| us-east1 | 南卡罗来纳 |
| us-east4 | 北弗吉尼亚 |
|
us-east5
|
哥伦布 |
|
us-south1
|
达拉斯 |
南美洲 |
|
southamerica-west1
|
圣地亚哥 |
| southamerica-east1 | 圣保罗 |
欧洲 |
| europe-west2 | 伦敦 |
|
europe-west1
|
比利时 |
|
europe-west4
|
荷兰 |
|
europe-west8
|
米兰 |
|
europe-southwest1
|
马德里 |
|
europe-west9
|
巴黎 |
|
europe-west12
|
都灵 |
|
europe-west10
|
柏林 |
| europe-west3 | 法兰克福 |
|
europe-north1
|
芬兰 |
|
europe-north2
|
斯德哥尔摩 |
| europe-central2 | 华沙 |
| europe-west6 | 苏黎世 |
中东 |
|
me-central1
|
多哈 |
|
me-central2
|
达曼 |
|
me-west1
|
特拉维夫 |
亚洲 |
| asia-south1 | 孟买 |
|
asia-south2
|
德里 |
| asia-southeast1 | 新加坡 |
| asia-southeast2 | 雅加达 |
| asia-east2 | 香港 |
| asia-east1 | 台湾 |
| asia-northeast1 | 东京 |
| asia-northeast2 | 大阪 |
| asia-northeast3 | 首尔 |
澳大利亚 |
| australia-southeast1 | 悉尼 |
|
australia-southeast2
|
墨尔本 |
非洲 |
|
africa-south1
|
约翰内斯堡 |
位置 SLA
您的 Cloud Firestore(兼容 MongoDB)位置类型决定了服务等级协议 (SLA) 在正式版 (GA) 中的正常运行时间百分比:
涵盖的服务 |
每月正常运行时间百分比 |
与 MongoDB 兼容的 Cloud Firestore 多区域 |
>= 99.999% |
与 MongoDB 兼容的 Cloud Firestore(区域性) |
>= 99.99% |
位置价格
您的 Cloud Firestore(具有 MongoDB 兼容性)位置决定了数据库操作的费用。
如需了解每个区域和每个区域类型的定价的全面说明,请参阅了解 Cloud Firestore(兼容 MongoDB)的计费方式。
查看数据库的位置
使用以下任意一种方法可查看数据库的位置设置:
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["\u003cbr /\u003e\n\nWhen you provision a Cloud Firestore database, you must choose a\n*location* for it. To reduce latency and increase availability, store\nyour data close to the users and services that need it.\n\nYou can optionally [create multiple databases](/docs/firestore/manage-databases) in your\nproject, each with its own location setting.\n\nBe aware that once you provision a database, you cannot change its\nlocation setting.\n\nTypes of locations\n\nYou can store your Cloud Firestore with MongoDB compatibility data in a\n[*multi-region* location](#location-mr) or a [*regional* location](#location-r).\n\nMulti-region locations\n\nSelect a multi-region location to maximize the availability and\ndurability of your database.\n\nA multi-region location consists of a defined set of\n[regions](https://cloud.google.com/docs/geography-and-regions#regions_and_zones) where multiple replicas of the database\nare stored. Each replica is either a read-write replica which contains all of the\ndata in the database or a witness replica which does not maintain a full set of\ndata but participates in replication.\n\nBy replicating the data between multiple regions, data\ncan continue to be served even with the loss of an entire\nregion. Within a region, data is replicated across\n[zones](https://cloud.google.com/docs/geography-and-regions#regions_and_zones) so that data can continue to be served\nwithin that region even with the loss of a zone.\n\nCloud Firestore with MongoDB compatibility supports the following multi-region locations:\n\n| Multi-region name | Multi-region description | Read-Write regions | Witness region |\n|-------------------|----------------------------------|------------------------------------------------------------------------------|--------------------------------------------------------|\n| `eur3` | Europe | `europe-west1` (Belgium), `europe-west4` (Netherlands) | `europe-north1` (Finland) |\n| `nam5` | United States (Central) | `us-central1` (Iowa), `us-central2` (Oklahoma---private Google Cloud region) | `us-east1` (South Carolina) |\n| `nam7` | United States (Central and East) | `us-central1` (Iowa), `us-east4` (Northern Virginia) | `us-central2` (Oklahoma---private Google Cloud region) |\n\nRegional locations\n\nA regional location is a specific geographic place, such as South Carolina. Data\nin a regional location is replicated in multiple zones within a\n[region](https://cloud.google.com/docs/geography-and-regions#regional_resources). All regional locations are separated from other regional\nlocations by at least 100 miles.\n\nSelect a regional location for lower costs, for lower write latency if your\napplication is sensitive to latency, or for\n[co-location with other Google Cloud resources](https://cloud.google.com/about/locations/#products-available-by-region).\n\nCloud Firestore with MongoDB compatibility supports the following regional resource locations:\n\n| | Region name | Region description |\n|---|---------------------------|--------------------|\n| **North America** |||\n| | `us-west1` | Oregon |\n| | `us-west2` | Los Angeles |\n| | `us-west3` | Salt Lake City |\n| | `us-west4` | Las Vegas |\n| | `us-central1` | Iowa |\n| | `northamerica-northeast1` | Montréal |\n| | `northamerica-northeast2` | Toronto |\n| | `northamerica-south1` | Queretaro |\n| | `us-east1` | South Carolina |\n| | `us-east4` | Northern Virginia |\n| | `us-east5` | Columbus |\n| | `us-south1` | Dallas |\n| **South America** |||\n| | `southamerica-west1` | Santiago |\n| | `southamerica-east1` | São Paulo |\n| **Europe** |||\n| | `europe-west2` | London |\n| | `europe-west1` | Belgium |\n| | `europe-west4` | Netherlands |\n| | `europe-west8` | Milan |\n| | `europe-southwest1` | Madrid |\n| | `europe-west9` | Paris |\n| | `europe-west12` | Turin |\n| | `europe-west10` | Berlin |\n| | `europe-west3` | Frankfurt |\n| | `europe-north1` | Finland |\n| | `europe-north2` | Stockholm |\n| | `europe-central2` | Warsaw |\n| | `europe-west6` | Zürich |\n| **Middle East** |||\n| | `me-central1` | Doha |\n| | `me-central2` | Dammam |\n| | `me-west1` | Tel Aviv |\n| **Asia** |||\n| | `asia-south1` | Mumbai |\n| | `asia-south2` | Delhi |\n| | `asia-southeast1` | Singapore |\n| | `asia-southeast2` | Jakarta |\n| | `asia-east2` | Hong Kong |\n| | `asia-east1` | Taiwan |\n| | `asia-northeast1` | Tokyo |\n| | `asia-northeast2` | Osaka |\n| | `asia-northeast3` | Seoul |\n| **Australia** |||\n| | `australia-southeast1` | Sydney |\n| | `australia-southeast2` | Melbourne |\n| **Africa** |||\n| | `africa-south1` | Johannesburg |\n\nLocation SLA\n\nYour Cloud Firestore with MongoDB compatibility location type determines the\n[Service Level Agreement (SLA)](/terms)\nuptime percentage at General Availability (GA):\n\n| Covered service | Monthly uptime percentage |\n|---------------------------------------------------------|---------------------------|\n| Cloud Firestore with MongoDB compatibility Multi-Region | \\\u003e= 99.999% |\n| Cloud Firestore with MongoDB compatibility Regional | \\\u003e= 99.99% |\n\nLocation pricing\n\nYour Cloud Firestore with MongoDB compatibility location determines the cost of database\noperations.\n\nFor a comprehensive explanation of pricing per region and per region type,\nsee [Understand Cloud Firestore with MongoDB compatibility billing](https://firebase.google.com/pricing).\n\nView the location of your databases\n\nUse one of the following methods to view the location setting for your databases:\n\n- Run the [`gcloud firestore databases list`](https://cloud.google.com//sdk/gcloud/reference/firestore/databases/list)\n command.\n\n- Open the\n [database list](https://console.cloud.google.com/firestore/databases) in the Google Cloud console.\n The location for each database is in the location column.\n\nNext steps\n\n- To create a Cloud Firestore with MongoDB compatibility database in a specific location, see\n [Create and manage databases](/docs/firestore/manage-databases)\n\n- For more information about building applications to meet your latency,\n availability, and durability requirements, refer to\n [Geography and Regions](https://cloud.google.com/docs/geography-and-regions#multi-regional_resources)."]]