Change Firebase Firestore Server location [duplicate] - firebase

I'm working on a product which for legal reasons needs to store user data in a specific region.
I'm using Firebase so I created a project selecting the region it needs to be in however looking at firestore where the user data is kept I can't find anything pinpointing the region the data actually is. The thing which makes me worry the most is the Cloud Functions endpoints start with us-central1 but obviously that could just be that cloud functions don't exist in the specified region.
Given this is an important matter is there a way to confirm the location of data and even force it to be in a specific region?

Update
Cloud Firestore supports the following regional GCP resource locations, in addition to the 2 multi-region (nam5, eur3) locations:
See the documentation for an up-to-date list of locations.
Original Answer
Cloud Firestore is currently only available in our US multi-region (Iowa, Oklahoma, South Carolina). As we approach GA we plan to roll it out to multiple locations across the globe and you'll be able to select which one at creation time. Not something you can do today though.

Related

Firebase limits me to set my database to one region permanently, how do I serve people from other regions with low latency?

So I have set the location of my Firestore database to asia-south-1, let suppose now I start getting users from the US as well as from India, how will I serve both the groups with lower latency?
You can't change the properties of your project once it's set up, nor even simply pay more for better service. If you want improved service in different regions, you will need to buy computing resources in each of those regions. This requires setting up multiple projects, with each Firestore product configured for the region you want improved service. Note that not all Firebase and GCP products are available in all regions.
If you want all users in all regions to be using the same set of data with improved latency, that's not possible to configure. You will have to build a way to mirror data between the different projects. There is nothing terribly easy about that, nor are there any existing solutions offered by Firebase or GCP to do this for you.
Doug nailed it for Firestore. So 👍
Note that Firebase's Realtime Database (unlike Firestore) can have multiple databases per project, which means you can set up a database instances in each region (it support three right now) and redirect your user's traffic to the region closest to them. You may still have to replicate data between the database instances, similar to Doug's answer, but (unlike in Doug's answer) with Realtime Database this can happen within a single project.

Can I disable data replication in Datastore multi region location?

I want to use Datastore (Firestore in Datastore mode) in europe-west1. Since Datastore is not available as a regional location in europe-west1 I will go with the multi-region location (which consists of europe-west1 and europe-west4 according to this doc).
Do I understand data replication correctly in that if I store data in Datastore, Google automatically stores all the data in both regions europe-west1, europe-west4?
Can I disable data replication in europe-west4 since I just want to use Datastore in europe-west1?
Also just for my understanding: If multi-regional means there is a Data Center in each region why are both not available as single regional location?
Any help is appreciated.
The multi-region in GCP makes all the data replication automatically and this is by design, so that you have higher availability, performance, and resource efficiency and this is out of your control, so you can't disable data replication in a multi-region environment.
To your second question there is nothing that justifies this in the documentation, so I assume unofficially that this happens because Google simply does not allow for individual regions for that particular reason because it's not the focus of that particular region and acts just as a replicated location for that particular product when set to multi-region.

Firebase Scalability - More than 100k user at the same time and across multiple region

I know scalability is not an issue in Firebase and supports up to 100k Simultaneous connections(in general).
Based on pricing documentation:
You can create multiple database instances to go beyond the 100K
concurrent limit. See Pricing FAQ for more information.
Question 1: What if there is more than 200k users using simultaneously on the same database? The other half of the users could not query, connect or the request will be placed in queue?
(As a Firebase plan subscriber, I would like to know how Firebase deals with the problem to ensure the quality of the services provided to our customers are always in top-notch)
Since, App globalisation is common nowadays and many companies' practices are to have servers across multiple regions to provide better and stable performance. Online game for example which required low latency.
As for now, the firebase user is required to set the default location when creating the project which is non-editable afterward. Some issues even rises where the users realised they deployed their app to the wrong regions and do not have clues on how to change the regions.
This represents the country/region of your organisation/company. Your
selection also sets the appropriate currency for your revenue
reporting. The selected country does not determine the location of
your data for Firebase features. Google may process and store Customer
Data anywhere Google or its agents maintain facilities.
Question 2: Will or does Firebase provide a solution / tailor-made to such practice which having our database in multiple regions while having a headquartered region and multiple other regions sharing all the databases, functions and auth across the regions?
(For now to have multiple servers location, we have to create different projects and the user and data syncing will be a problem)
Hope the language does not offend, cheers!
It seems like your question (or at least your assumptions) is based on the Firebase Realtime Database, so I'll answer for that below.
Q1) You can create more than 2 databases in a single project, each of which allows 100K connections. So it can scale beyond 200K connections. All of these are hosted in the same region though, so you can't use each database for a separate region.
Q2) For a database solution that handles multiple regions, I'd recommend looking at Cloud Firestore. Also see: Cloud Firestore - selecting region to store data?

Cloud Firestore - selecting region to store data?

I'm working on a product which for legal reasons needs to store user data in a specific region.
I'm using Firebase so I created a project selecting the region it needs to be in however looking at firestore where the user data is kept I can't find anything pinpointing the region the data actually is. The thing which makes me worry the most is the Cloud Functions endpoints start with us-central1 but obviously that could just be that cloud functions don't exist in the specified region.
Given this is an important matter is there a way to confirm the location of data and even force it to be in a specific region?
Update
Cloud Firestore supports the following regional GCP resource locations, in addition to the 2 multi-region (nam5, eur3) locations:
See the documentation for an up-to-date list of locations.
Original Answer
Cloud Firestore is currently only available in our US multi-region (Iowa, Oklahoma, South Carolina). As we approach GA we plan to roll it out to multiple locations across the globe and you'll be able to select which one at creation time. Not something you can do today though.

Where is firebase data center located ?

We are defining our privacy policy and customers (specially in the EU) are concerned where their data is located.
Is this still the right answer or did anything change since 2014?
http://grokbase.com/t/gg/firebase-talk/14axy4z42p/firebase-where-is-my-data-stored
At the Google DevFest in Amsterdam, I heard from Frank van Puffelen who presented Firebase to us that at that time (10/10/2015) they had a datacentre in the US and were planning to open one in Europe.
I'd like to give you more details but that's all I know.
I'm also hoping they will open a datacentre in the EU, since there are fresh laws about where our data collected from EU citizens can be stored and that the Safe Harbour legislation will become irrelevant from what I understand (correct me if I'm wrong).
According to the official FAQ, there are certain services that are US-Only.
For example, these are US-Only:
Firebase Realtime Database
Cloud Firestore for Firebase
The rest of the services are claimed Global, and can be hosted in any Google data center, or even a data center run by a selected external party. E.g.:
Cloud Storage for Firebase
Cloud Functions for Firebase
The FAQ also mentions, that Firestore will soon become available Globally:
Note: Though currently US-only, Cloud Firestore will soon be available at all Google Cloud Platform locations.
According to the Google guide Set a project location, you can either choose for a multi-regional location or a regional location. Multi-regional locations offer better replication over multiple regions and better write latency, but are only available in the US (as of writing). Regional locations keep your data within the region, but that means that if that region experiences e.g. a power outage, your service will become unavailable. However, for regional locations, a data center in Frankfurt, Germany is available (again, as of writing).
Side-Note: Cloud Firestore and Cloud Storage will be within the specified region, but Cloud Functions will always be in us-central1 (as of writing).

Resources