To enable replication, a replica set of MongoDB instances should be created. MongoDB should be installed on three nodes i.e one primary node and two secondary nodes.