I’m creating a SaaS at the moment that will have various companies subscribed. All data for each company should be entirely separate. I’m wondering what the best practice here is?
- A single instance and DB using a companyId field to denote who the data belongs to and tight controls in the publications.
- An instance per company that connects to the Mongo deployment with different DBs for each company. Using something like this db-proxy.
Load and data size is likely to be low so I’ve been thinking of 1, but 2 seems the more secure option - although setup for each company is a bit more work. Thoughts?