Multitenant Firestore Database
Allows the creation of multiple databases in Firestore. In datastore, it already has out-of-the-box multitenancy support that allows logical partitioning of data. While you can separate tenants through collections, it helps if we have this natively.
-
Dennis Kugelmann commented
Unfortunately, Firebase Extensions can't use non-default databases ...
This is a major blocker in adopting them for us right now ... -
Firestore shipped in preview of having multiple database per project last week: https://cloud.google.com/firestore/docs/release-notes#July_07_2023
(Edited by admin) -
Dennis Kugelmann commented
@Lars the things I've mentioned would not be possible with a single Firestore database ...
-
Dennis Kugelmann commented
Yes, being able to setup multiple databases is so valuable.
Things we hope to get from it:
- Being able to logically separate data (user metadata, usage data, user generated content, ...)
- Ability to give different read/write permissions to the different databases, so that one service only has access to user data and another to user generated content
- Have monitoring per database so that you know when a spike is happening in which database it comes from
- Have billing labels per database so that it's easier to assign costs to features making it easier to identify and fix cost drivers
- And also (as Morten mentioned) be able to spin up new instances in different regions (even if it's just single region vs Multi-Region databases). Would be sad if the database as still tied to the App Engine region ... -
Lars Støttrup Nielsen commented
Why not just model this yourself? We've built multitenancy in our Firestore project
-
Morten Bek Ditlevsen commented
I'd love this as well, but with the use case of being able to add a firestore instance in the EU zone as well as the one I already have in the US - in order to fulfil GDPR requirements.