we are developing a large node application with express and MongoDB. We are trying to get better performance because we will have several clients (possibly 100+) working on the same server.
We thought in one-on-one APP, one instance, one database and several clients accessing their domains.
I want to know what are the best settings for this scenario (single server, multiple clients) for performance and development.
- One instance, one database (client data will be identified by
companyObjectId in the record, and clients will access the domain or subroutine) - One instance, several tables (or databases, which is better?)
- Multiple instances, multiple tables
- Any other ideas?
In the first setup, developers will always worry about the current company, and this may bring limitations to the application
In the second setup, the problem will continue, but the company will not interfere with the database records (cleaner model)
In the third setup (perhaps the best one for development), only one company will be considered and will bring many opportunities, but it can lead to performance problems (all instances will run on the same server)
Other settings that I did not think about may be better.
Notes:
We use the mongoose library
I have some experience with WordPress and I like the way themes and plugins are created for it. We are trying to achieve a performance level similar to Wordpress with PHP (several Wordpress works efficiently on the server)
sorry for bad english