Server instance is associated with dbpath?

Hi there, while executing the lab about changing the log path, I came up with this doubt if the db instances are associated with the db path, can I have multiple mongod processes running in the same machine with different dbpath directories?

Hey @Euclides_04014

That is not a doubt but a revelation! You deffinately can have multiple mongod processes running on the same machine; and in the course you will have up to 9, if I remember correctly!

However keep in mind just because you can do something does not mean you should! It is done here to demonstrate how the cluster setups work. In a production env things would be different! Like one mongod per machine. Nowadays it can even all be in containers with Docker!


thank you @natac13, knowing that really helps keeping the configurations neat.

1 Like