Our multi-tenant app has about 4000 databases per tenant and we are having a problem with performance because of too many connections. Creating MongoDB connections on each database is a heavy operation.
We tried the following approaches but still could not reduce the number of connections.
- Sharding only applying for the datasets
- Increasing the pool size already applied
How to reduce the number of MongoDB connections? Is there any way to split databases into 1000,1000?