I need to add another cluster, using separate shard nodes, but I would like to reuse the same RS as the config server for both clusters.Will such configuration work properly, without the two clusters affecting each others operation?
Hi Jacek,
MongoDB servers can only be a member of a single replica set or sharded cluster, so your proposed configuration is not possible.
You could potentially share the same physical/virtual server instances by running mongod
processes on different ports, but doing so is not recommended (especially for production environments). With shared servers multiple processes will be competing for the same server resources and there is added risk of accidental interaction between deployments.
I'm running a sharded MongoDB cluster with config server running as a replica set of 4 nodes.
Note: it is strongly recommended that you have an odd number of voting members in your replica set configuration to help ensure a primary can be elected.
Regards, Stennie