Answer the question
In order to leave comments, you need to log in
Use one database from multiple mongod processes
Hello.
I'm not very good at mongo and I had a problem with write-read locks, which made working with the database extremely slow and unbearable.
Having googled and smoked the MongoDB documentation on Concurrence in a quick way, I roughly understood that you can somehow run several mongod instances, and in one instance, for example, perform write operations, in another, read operations.
Is it possible to do this without creating a Replica Set?
I imagine it like this:
mongod --fork --port 27018
mongod --fork --port 27019
mongod --fork --port 27020
But instances are only launched with a separate dbpath, so the target database in other instances is empty.
Is it possible to somehow use the same database from multiple mongod instances without constantly copying it?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
will not work, because the same resource will be used (well, that is, it’s impossible). I significantly improved the situation by spreading the collections across different databases (the database is locked, not the server). in application I specify not a collection and base.collection every time. But if you have a load on one collection, then this will not help
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question