Locations

Before you use Cloud Firestore, you must choose a location for your database. To reduce latency and increase availability, store your data close to the users and services that need it. This location setting is your project's default Google Cloud Platform (GCP) resource location.

Note that your default GCP resource location might have been previously set, either during project creation or when setting up another service that requires a location setting (see below).

Default GCP resource location

Several services available for your app require a location setting, called your project's default Google Cloud Platform (GCP) resource location. This location is where your data is stored for GCP services that require a location setting.

The following products share the same default GCP resource location:

  • Cloud Firestore

  • Cloud Storage
    Note that your default GCP resource location only applies to your default Cloud Storage bucket. You can create multiple buckets, each with their own location.

  • Google App Engine (GAE) app
    If you set up an App Engine app, its location shares your default GCP resource location. Note that if you use Cloud Scheduler (for example, to run scheduled functions), you're required to have an App Engine app in your project.

Types of locations

You can store your Cloud Firestore data in a multi-region location or a regional location.

Note that if you already have an App Engine app with a location of either us-central or europe-west, your Cloud Firestore database will be considered multi-regional.

Multi-region locations

A multi-region location is a general geographical area, such as the United States. Data in a multi-region location is replicated in multiple regions. Within a region, data is replicated across zones.

Select a multi-region location to maximize the availability and durability of your database. Multi-region locations can withstand the loss of entire regions and maintain availability without losing data.

Cloud Firestore supports the following multi-region GCP resource locations:
Multi-Region Name Multi-Region Description Constituent Regions
eur3 or europe-west Europe europe-west1, europe-west4
nam5 or us-central United States us-central1, us-central2 (Oklahoma — private GCP region)

Regional locations

A regional location is a specific geographic place, such as South Carolina. Data in a regional location is replicated in multiple zones within a region. All regional locations are separated from other regional locations by at least 100 miles.

Select a regional location for lower costs, for lower write latency if your application is sensitive to latency, or for co-location with other GCP resources.

Cloud Firestore supports the following regional GCP resource locations:
Region NameRegion Description
North America
us-west2Los Angeles
northamerica-northeast1Montréal
us-east1South Carolina
us-east4Northern Virginia
South America
southamerica-east1São Paulo
Europe
europe-west2London
europe-west3Frankfurt
europe-west6Zürich
Asia
asia-south1Mumbai
asia-east2Hong Kong
asia-northeast1Tokyo
asia-northeast2Osaka
Australia
australia-southeast1Sydney

View your project's location settings

Use one of the following methods to view the location setting for your project:

  • Run the gcloud app describe command.

  • If you have an active App Engine app, open the App Engine Dashboard in the Google Cloud Platform Console. The location information is in the upper right-hand corner of the dashboard, and it applies to both App Engine and Cloud Firestore.

    Screenshot of the previously chosen location

  • In the Firebase console, go to your Project settings.

Next steps

  • For more information about building applications to meet your latency, availability, and durability requirements, refer to Geography and Regions.
هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...