I have such a firebase data and rule structure:
So...my firebase data downloads are very high..almost 1GB per day. (300 users, 3,5MB database size) I think the reason for this is that the user downloads the whole database to get to the "users/$uid" section. It only requires data from the $uid area. How is it possible not to download the other data about it?
My database ref in code
Like: this.dataObjRef = this.afDatabase.object("data/users/${uid}");
What I tried
I tried to set ".read" : "false"
directly in the rules above, but then none of the data is accessible, although ".write" at the bottom of the says "$uid": "$uid === auth.uid"
Do you have any idea?
/data/users/${uid}
. To learn what a single client reads, you can profile your database: firebase.google.com/docs/database/usage/profile – Frank van Puffelen