MongoDB is a highly scalable document-based NoSQL database solution that the Sitecore Experience Database (xDB) uses for the collection database. Before you install MongoDB, you should consider the following:
- Decide whether you want a public cloud-based solution, such as Windows Azure, or one within your own data center on either physical or virtual hosts. For more information, see
- Ensure that the MongoDB working set fits in memory for optimal performance. This is often the most important performance factor when you are considering vertical scaling or scaling up, followed by disk and CPU. For more information about working sets and RAM, see:
- Apply security practices; The default MongoDB configuration assumes a trusted networking environment and cannot be exposed to a public service such as Azure, this is described in the MongoDB Production Notes. When deploying on Azure or another public infrastructure service, always take the necessary security measures described in the MongoDB Security Checklist, or consider using a managed MongoDB service.
- Select the right hard disks – you can use solid-state drives (SSD) for fast reads and writes, or hard disk drives (HDD) for larger capacities at lower cost. Typically, you should use SSDs as they offer significantly higher performance. If you use HDDs, use 15k RPM SAS disks in a RAID10 configuration for a balance of performance and fault tolerance.
- Decide how many MongoDB servers you need:
- Standalone server – for testing and development
- Single replica set – the minimum recommended configuration for production, which should have at least 2.5 servers: two full capacity data servers for failover and one low capacity server for the arbiter. You should use three data servers for a robust and resilient deployment, especially during maintenance.
For more information, see: MongoDB replication.
- Read the whitepaper Performance Best Practices for MongoDB.
For more information about MongoDB, see their documentation.
All production deployments of MongoDB should use replication, which requires a minimum of three servers, to provide redundancy and increase data availability. You should only use single server installations for development and testing.