Documentation here says three: http://docs.mongodb.org/manual/tutorial/deploy-replica-set/
"A replica set requires three distinct systems..."
Whereas the documentation here says two: http://docs.mongodb.org/manual/core/replication/
"Most replica sets consists of two or more mongod instances..."
Anyone know which is correct?
You can actually run a single member "set" if you want.
3 members (or a higher odd number) is really best, though. Replica sets go read only if a majority of the set isn't available, so if you lose a member in a two-member set the remaining member becomes read only.
You can run two full members plus an "voting-only" member (called an arbiter) as well. This is the smallest reasonably safe option for a replica set.
This is basically a wording issue because the requirements in the tutorial are not a general statement about replica sets, rather they pertain to the tutorial itelf. The requirement for deploying a replica set in general is 1 or more, most have 2 or more, but the tutorial you link to is specifically to deploy a 3 member set:
Hence, the requirement for the tutorial is that the set have 3 members. Nevertheless, it is a little confusing to have the two statements, so I submitted a pull request (EDIT: pull request has now been merged in) to clean it up a bit.
You can have a single mongod node configured to be part of a replica set, but strictly speaking that would not be a "set". In fact, since replication uses more resources than a standalone
mongod
(basically because of the oplog) there is really no point to running a single member unless it is as a temporary measure before you add other members to the set or if you require an oplog for other reasons (such as backup).