Replica Set and cluster setup on windows server 2019

hi, I am newbie for mongodb and want to ask for the replica set is just only can setup in same server? or is can be replica to another server and running it?

how I can setup the cluster to another windows server 2019?

thanks.

Hi @Kelvin_Shee,

Members of a replica set are normally distributed across different physical hosts to achieve data redundancy as well as automated failover.

You would typically only colocate replica set members on the same host server for development or testing purposes, as otherwise you are compromising the failover benefit and will potentially have multiple replica set members competing for the same physical resources.

Follow the tutorial to Deploy a Replica Set in the MongoDB server documentation. If you run into any issues during set up, this forum is a good channel for assistance. I suggest including information on the specific version of MongoDB server you are installing, the step of the tutorial or configuration you are currently stuck on, and any relevant error/log messages.

Since you are creating a distributed deployment, please also review the MongoDB Security Checklist for available security measures.

Regards,
Stennie