Our best practice is to set up a mongodb replica set consisting of 3 servers (1 primary and 2 secondary). Setting up a cluster of only 2 servers, is not reliable enough as a failover system because it only has majority of 1 (more of that later).
- 3 database servers (MongoDB) set-up as a replica set
- 4 x CPU E5 2650 v2 processors
- 8GB RAM
- 100GB HDD (dedicated to db storage)
If you have a webshop with 10.000 of visitors every day, you might want to boost up the RAM in your machines, but if this isn't the case, the machines are practically doing nothing.
The HDD depends on which storage mode you are using for your MongoDB. If you use the most compressed storage, you won't need that much storage at all.
To continue the part I was previously talking about, in a replica set, the MongoDB machines act as a "family". If a primary wants to resign and wants become a secondary machine, a voting will take place for the other machines about who will become the primary machines. A replica set will always act as a set containing a primary and a secondary machine. If one of these is not present, the replica set will fall apart causing real trouble for your site.