In MongoDB there are the following conecpts:
A MongoDB database
exists as a logical unit on a MongoDB Instance
which is either a singleton or a cluster running within some number of mongod processes
on some number of servers.
There is lots of Q&A around answering the question: Should one run multiple production mongod processes on the same server?
to which the answer is: In general no.
However, what about the question of having multiple production databases on the same instance? I.e.:
- Set up a production grade mongodb cluster,
- Create a number of databases by doing something like
use someDatabase;
db.someDatabase.insert({});
3.Creating a User/Role that is limited in access to someDatabase
The above described configuration could obviously suffer from the noisy neighbor problem (& related DoS attacks), but otherwise is the above considered a normal and standard way of providing a logical & security barrier between tenants? What are the pros/cons of doing so? If I needed to migrate one of these logical DBs to its own MongoDB instance, would that be possible?