Basic configuration with three nodes
The replica set is a group of mongod instances that maintain the same data set.
This example shows how to configure a replica set with three instances on the same server.
Creating data folders
Starting mongod instances
Configuring replica set
Testing your setup
For checking the configuration type rs.status(), the result should be like: