I'm researching if MongoDB is the solution for my problem of storing schema-less data for multiple users. Let me sketch the problem: I've got a lot of users (100k) and want to have some place for these users to store data. Now I can create some kind of proxy that will do the RBAC for me and filter data based on some property in the database, but I wonder if MongoDB can do this for me.
I cannot seem to find any limitations on the documentation page of MongoDB that there are limits of how many users+roles+collections there can be on one MongoDB server (preferably a cluster).
At the moment I'm thinking of a structure where every user has a access to a single collection. I can put these collections into a single database and then give the user a role that only has readWrite access to a single collection.
This would mean that the database would exist of 100k collections that each have 1 role with 1 user.
Is this a feasible structure and would this scale/perform well?
If I would chose for the proxy solution then I would let my proxy filter the data based on who requests it. That would result in a data structure like the one below:
{
_id: ObjectID(),
customerId: "some customer id",
data: {}
}