Configuring high availability replication
Overview and concepts
A MVMA installation ships with a java-based runtime, which implements the MVMA product functionality and requires a MongoDB service, which maintains the MVMA data.
A MVMA cluster consists of one primary instance and two or more secondary instances. Any client can connect to any MVMA service, but the data from any given MVMA service is read from or written to the current primary MongoDB instance.
When a MongoDB service instance fails, if it is the primary instance, a new primary instance will be elected from the set of existing instances. When a failing MongoDB service instance restarts, it rejoins the cluster and is available as a secondary node.
A MVMA cluster must have a minimum of three nodes running on three separate hosts to make sure that it can easily determine a primary MongoDB instance. If the number of MongoDB instances ever reaches one in a replica set, the database is set to read-only and no writes can occur. Therefore, it is important to have enough instances. Three is the lowest number of instances to be safe, but we recommedn using more.
Configuration
Configuring the cluster consists of configuring a MongoDB replica set and of configuring MVMA to be attached to the proper MongoDB® replica set nodes.
To configure the MongoDB replica set
To configure MVMA for using a MongoDB replica set
Perfom the following steps after the MongoDB replica set is configured and deployed to all nodes of the MongoDB replica set:
- Denote the host names of all nodes in the MongoDB replica set and the port numbers MongoDB uses on these hosts.
- Install and configure MVMA on each node of the MongoDB replica set.
- For each replica set node edit the configuration file com.bmc.mmadmin.service.cache.cfg located in the configuration/services sub-directory of the MVMA installation folder and change the value of the key mongoReplConfig to the comma-separated list of the replica set nodes, each in the format <hostname>:<port>. For example, MongoDB is set up on the replica set hosts named 'host1', 'host2' and 'host3' uses the default port 27017, then change the entry to:
mongoReplConfig=host1:27017,host2:27017,host3:27017 - Assign MVMA to the MongoDB replica set consisting of the nodes built by the MongoDB instances on host1, host2 and host3, then start MVMA services on each host of the MongoDB replica set.
- The MVMA cluster is now available on all nodes of the underlying MongoDB replica set.