A replica set is a group of two or more nodes. Replication needs a minimum of three nodes. One node will be primary and the rest replicated nodes from the primary node will be the secondary nodes.