Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments. Click here to view the documentation for the current version.

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.

Benefits

  • 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.

Benefits

  • RedundancyReplication 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.

Deployment model

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. 

The following diagram illustrates the deployment model for MongoDB.

Types of servers

Primary serverSecondary server
  • Stores the data.
  • All read/write operations go to this server from any client.
  • Stores backup data and is synchronized with the primary server.
  • If the primary server is unavailable, the replica set elects a secondary server to become the primary server.

Deployment process

The following table summarizes the process of deploying MongoDB securely in a production environment:

StepActionDescription
1Review the supported versions

MongoDB supported version

  • MongoDB 2.6.x, 3.0.x
  • Provided version: MongoDB 3.2.x
2

Install MongoDB

You must install MongoDB on the primary and secondary servers.
3Configure MongoDB as a replica setYou must perform these steps only on the primary server
4Apply 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.

5

Configure search

BMC recommends that you use Full Text Search which is available by default. 

Related topics

Upgrading MongoDB

Additional resources

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Conrad Pereira

    In the deployment process, Step 1: Description column: it says "Provided version: MongoDB 3.2.x"

    In the below links mongoDB software links are showing as follows:

    A. https://docs.bmc.com/docs/display/public/myit31/Installing+and+setting+up+MongoDB+on+Windows - Step 2

    => http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.0.8.zip

    B, https://docs.bmc.com/docs/display/public/myit31/Installing+and+setting+up+MongoDB+on+Linux - Step 2

    => https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.0.6.tgz

    1. The mongodb links should redirect to versions 3.2.x instead, in the two docs URLs above.
    2. The mongodb link should refer to RHEL links for linux and not amazon links.

    Please clarify. 

    Feb 26, 2016 08:02
    1. Amit Durgapal

      Hello Conrad,

      Thanks for point this out. I have updated the links for MongoDB 3.2.x.

      Regards,

      Amit 

      Feb 26, 2016 08:46
  2. Shekhar Raj

    Why BMC recommends to have odd number of Mongo DB server always? What is the justification behind it?

    Sep 14, 2016 11:45
    1. Michele Marques

      Hello Shekhar,

       

      Those recommendations actually come from MongoDB. See the link that we provide (https://docs.mongodb.com/manual/tutorial/deploy-replica-set/). Basically, when there is a discrepancy between servers, they have an "election" to determine which is right. By having an odd number of servers, there won't be a tie.

      - Michele

      Sep 15, 2016 12:34