Multiple v / s databases Multiple collections - MongoDB 3.2

I know this question has been asked several times here. However, I cannot find a satisfactory answer and come to a conclusion.

This question is specifically for Mongo DB version 3.2. Should I have separate databases and a collection for different applications or only one database with all the collections inside it?

To simplify it, let's say I have about 15-20 thousand applications on the server. Is it advisable to create another database for each of these applications (with 10 collections / application) or to create only one database and store all collections (20 thousand applications * 10 collections = 200 thousand collections)?

In addition, this will be called from a single Node application, so performance needs to be considered when there are multiple DB connections.

+4
source share
1 answer

Should I have separate databases and a collection for different applications or only one database with all the collections inside it.

As I understand it, there is no specific answer or any specific algorithm for this question. It depends on the lack of database connections. The number of connections depends on the number of requests waiting for matches, so first you see logically that it is really worth creating a different database for each of these applications Or in a different way (with 10 collections / application)

- ( )

0

Source: https://habr.com/ru/post/1620519/


All Articles