Deploying MongoDB as a replica set
The following topics are provided
Purpose of MongoDB
MongoDB is included with and used by BMC MyIT and BMC Remedy with Smart IT (Smart IT). MongoDB is a database intended for very large amounts of data.
The installer for BMC MyIT and SmartIT can install MongoDB only on the same server as it installs BMC MyIT and Smart IT. While that configuration is suitable for development and testing, it does not provide the high availability and scalability that you need for your production environments.
- High-performance database: Doesn't use joins or embedding, which make reading and writing data fast.
- Scalable: Scalable through automatic sharding, which means automatic partitioning of data across partitions.
- High availability: MongoDB can be used in high availability environments through replicated servers with automatic fail-over.
Purpose of a replica set
MongoDB can be used in high availability environments through replicated servers with automatic fail-over.
- Redundancy: Replication provides redundancy and increases data availability.
- Recovery: Replication also allows you to recover from hardware failure and service interruptions. With additional copies of the data, you can dedicate one to disaster recovery, reporting, or backup.
- Read capacity: You can use replication to increase read capacity. Clients have the ability to send read and write operations to different servers.
- Availability: To increase the locality and availability of data for a distributed environment, you can maintain replica servers in different data centers.
BMC recommends that you deploy a minimum of 3 node (always have odd number of servers) MongoDB replica-set – one primary and two secondary servers.
While increasing the number of mongodb nodes add a arbiter when you have even number of mongodb replica nodes.
The following diagram illustrates the deployment model for MongoDB
Types of servers
|Primary server||Secondary server||Arbiter server|
BMC Remedy with Smart IT (Smart IT) and BMC MyIT uses the built-in search of MongoDB. However, with MongoDB 3.0.xx, WiredTiger engine is available which has considerably improved the performance. Thus, for search you now have the following options:
- Full Text Search: BMC recommends that you use Full Text Search which is available by default.
- Elasticsearch: With this release, version 1.4.2 is supported. See, Configure Elasticsearch with MongoDB.
You must configure search after you have completed the installation of SmartIT and BMC MyIT.
The following table summarizes the process of deploying MongoDB securely in a production environment:
|1||Review the supported versions|
MongoDB supported version
Elasticsearch supported version
|You must install Mongo DB on the primary, secondary, and arbiter servers.|
|3||Configure MongoDB as a replica set||You must perform these steps only on the primary server|
|4||Apply security settings|
You must perform these settings only for bundled Mongo DB. For replicated DB security settings are taken care of during the installation of Mongo DB.
BMC recommends that you apply security settings using the authentication method.
At this stage you must store the MongoDB password in encrypted format in the configuration file.
For search you now have the following options:
- MongoDB 3.0 replication deployment: http://docs.mongodb.org/manual/tutorial/deploy-replica-set/
- MongoDB 2.6 replication deployment: http://docs.mongodb.org/v2.6/tutorial/deploy-replica-set/