For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Configuration guide
Some configuration for the MobileFirst Analytics Server is required. Some of the configuration parameters apply to a single node, and some apply to the whole cluster, as indicated.
Properties
For a complete list of configuration properties and how to set them in your application server, see Configuration properties.
- The discovery.zen.minimum_master_nodes property must be set to ceil((<number of master-eligible nodes in the cluster> / 2) + 1) to avoid split-brain syndrome.
- Elasticsearch nodes in a cluster that are master-eligible must establish a quorum to decide which master-eligible node is the master.
- If you add a master eligible node to the cluster, the number of master-eligible nodes changes, and thus the setting must change. You must modify the setting if you introduce new master-eligible nodes to the cluster. For more information about how to manage your cluster, see Cluster management and Elasticsearch.
- Give your cluster a name by setting the clustername property in all of your nodes.
- Name the cluster to prevent a developer's instance of Elasticsearch from accidentally joining a cluster that is using a default name.
- Give each node a name by setting the nodename property in each node.
- By default, Elasticsearch names each node after a random Marvel character, and the node name is different on every node restart.
- Explicitly declare the file system path to the data directory by setting the datapath property in each node.
- Explicitly declare the dedicated master nodes by setting the masternodes property in each node.
Cluster Recovery Settings
After you scaled out to a multi-node cluster, you might find that an occasional full cluster restart is necessary. When a full cluster restart is required, we must consider the recovery settings. If the cluster has 10 nodes, and as the cluster is brought up, one node at a time, the master node assumes that it needs to start balancing data immediately upon the arrival of each node into the cluster. If the master is allowed to behave this way, much unnecessary rebalancing is required. You must configure the cluster settings to wait for a minimum number of nodes to join the cluster before the master is allowed to start instructing the nodes to rebalance. It can reduce cluster restarts from hours down to minutes.
- The gateway.recover_after_nodes property must be set to our preference to prevent Elasticsearch from starting a rebalance until the specified number of nodes in the cluster are up and joined. If your cluster has 10 nodes, a value of 8 for the gateway.recover_after_nodes property might be a reasonable setting.
- The gateway.expected_nodes property must be set to the number of nodes that you expect to be in the cluster. In this example, the value for the gateway.expected_nodes property is 10.
- The gateway.recover_after_time property must be set to instruct the master to wait to send rebalanced instructions until after the set time elapsed from the start of the master node.
The combination of the previous settings means that Elasticsearch waits for the value of gateway.recover_after_nodes nodes to be present. Then, it begins recovering after the value of gateway.recover_after_time minutes or after the value of gateway.expected_nodes nodes joined the cluster, whichever comes first.
What not to do
- Do not ignore your production cluster.
- Clusters need monitoring and nurturing. Many good Elasticsearch monitoring tools are available that are dedicated to the task.
- Do not use network-attached storage (NAS) for our datapath setting. NAS introduces more latency, and a single point of failure. Always use the local hosts disks.
- Avoid clusters that span data centers and definitely avoid clusters that span large geographic distances. The latency between nodes is a severe performance bottleneck.
- Roll your own cluster configuration management solution. Many good configuration management solutions, such as Puppet, Chef, and Ansible, are available.
- Configuration properties
The MobileFirst Analytics Server can start successfully without any additional configuration.- Backing up Analytics data
Learn about how to back up your MobileFirst Analytics data.- Cluster management and Elasticsearch
Manage clusters and add nodes to relieve memory and capacity strain.
Parent topic: MobileFirst Analytics Server installation guide