Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Cloud Firestore unavailable in asia-south1 (Mumbai)?

I created my new Google Cloud project in Mumbai region because a majority of my users are in India for this project. This is a port of an existing project where I've been happily using Cloud Firestore before, for a small part of functionality. While not critical to main features of my project it is still pretty important.

However, when I try to provision a Cloud Firestore project in my Firebase console, it shows me this error:

Cannot enable Firestore for this project Currently Firestore cannot be enabled in this project's region

I'd much rather have the project hosted in asia-south1 because all of the content in this project is Indian language and people focused. Does anybody know of any way to make this work? I've got an Android app in the project that uses quite a few Firebase features, including Cloud functions, RTDB, Auth, and so on through the google-services.json mechanism. I'd use the RTDB for this feature as well, but the schema and requirements are much better suited to the new firestore.

Current alternatives I'm considering:

  1. Create a separate firebase project just for cloud firestore and attempt to configure multiple projects in my Android app
  2. Recreate all the projects in us-central and give up on using the mumbai region (even though it is super fast for my users)
  3. Give up on using Cloud Firestore and make a separate API somewhere else for the feature

Does anyone have any thoughts on this?

like image 886
Dhiraj Gupta Avatar asked Mar 15 '18 07:03

Dhiraj Gupta


People also ask

Is firestore multi region?

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.

How do I change my firestore region?

After you set your project's default GCP resource location, you cannot change it. If you set up Cloud Firestore or Cloud Storage, you're prompted to select your project's default GCP resource location in the Firebase console workflow.

Is firestore global?

Cloud Firestore is a NoSQL document database that lets you easily store, sync, and query data for your mobile and web apps - at global scale.

How do I change my Firebase Realtime Database region?

You can't change a location of a existing database. You would need to migrate it manually to a new one that you setup to the location you want. The migration is very easy. Just export the old database into a json file and import it to the new one.


1 Answers

I opened up a ticket with Firebase support, to which they responded with an "It's only available in the regions that it's available in, right now" kind of answer. And no, they don't have a committable timeline to when it will become available.

So we went with alternative #1. I made a "companion" firestore project in the US region, and figured out how to use 2 firebase projects for this in the Android app. When Firestore comes out of beta (soon, hopefully?) we'll add Firestore to the South-1 region and copy the data over.

like image 131
Dhiraj Gupta Avatar answered Sep 29 '22 08:09

Dhiraj Gupta