You can set up a production cluster for operational analytics.
Before you begin
For a production cluster, do not run the
IBM MobileFirst™ Platform Operational
Analytics on
the same server as the
MobileFirst Server.
The
IBM MobileFirst Platform Operational
Analytics uses
a large amount of the computer's processor and memory resources. Each
node should run on a separate server.
If you are deploying to a WebSphere® Application Server cluster,
also see Deploying in a clustered WebSphere Application Server environment.
About this task
To set up your production cluster, follow these steps.
Procedure
- Set the heap size for the application server. The
heap size has a very significant impact on the performance of the IBM MobileFirst Platform Operational
Analytics.
The heap size must be set on each application server that is hosting
a node. The -Xms Java™ option
sets the minimum heap size value. The -Xmx Java option sets the maximum heap
size value. For example, to reserve 8 GB of memory
for the IBM MobileFirst Platform Operational
Analytics,
set the following Java options:
-Xms8G -Xmx8G
Note: - The minimum heap size for a production server is 8 GB.
- Do not allocate more than half of the system memory to the application
server that is running the IBM MobileFirst Platform Operational
Analytics.
- Set the minimum and maximum heap size to the same value for an
application server that is hosting the IBM MobileFirst Platform Operational
Analytics.
- To change the heap size on WebSphere Application Server,
from the console, go to WebSphere Application Servers/<server
name>/Java, and Process Management/Process
definition/Java Virtual Machine. Then, restart the server
for changes to be taken into account.
For an
IBM MobileFirst Platform Operational
Analytics that
runs on a server with 32 GB of RAM, the optimal heap size is:
-Xms16G -Xmx16G
- Configure the first node in the cluster. The
first node in the cluster is important because some properties can
be set only by this node. It is important to ensure that the settings
for the node are present before you start the application servers.
The first node in a cluster must be a master node. A master node can
also act as a data node.
- Configure the node to be a master node. Set
the nodetype JNDI property to master.
<jndiEntry jndiName="analytics/nodetype" value="master" />
Note: By
default, a node acts as a master and data node. If you want to create
a node that acts as both a master and a data node, the node type does
not need to be set.
- Set the number of shards. Set the shards JNDI
property to the number of shards you want.
<jndiEntry jndiName="analytics/shards" value="10" />
- Set the number of replicas. Set the replicas_per_shard JNDI
property to the number of replicas you want.
<jndiEntry jndiName="analytics/replicas_per_shard" value="2" />
After all of the JNDI properties are set, the application server
can be started.
- Add a node to an existing cluster.
- Set the node type. Set the nodetype JNDI
property to either master or data.
<jndiEntry jndiName="analytics/nodetype" value="master" />
<jndiEntry jndiName="analytics/nodetype" value="data" />
Note: By
default, a node acts as a master and data node. If you want to create
a node that acts as both a master and a data node, the node type does
not need to be set.
Note: If you are deploying to a WebSphere Application Server cluster,
do not set the nodetype JNDI property. All nodes
in the WebSphere Application Server cluster
must act as master and data nodes.
- Provide a list of the master nodes. Set the masternodes JNDI
property to a comma delimited list of host names for the master node.
<host>:<transport-port>,<host>:<transport-port>
The
default transport port is 9600. You can change this value by using
a JNDI property. For more information about the transport port, see Ports that are used by the IBM MobileFirst Platform Operational Analytics.
For
example:
<jndiEntry jndiName="analytics/masternodes"
value="master1.ibm.com:9600,master2.ibm.com:9600" />
- Configure the worklight.properties file. Set the wl.analytics.url property to point
to any of the nodes (can point to a master or data node).
wl.analytics.url=http://<hostname>:<port>/analytics-service/data
Results
You have set up a production cluster.
Note: A node that
is set as a pure data node cannot run on its own without a master
node. The masternodes JNDI property must be set and
must point to an active master node.
A node that is set as a
pure master node cannot store data. Any attempts to store or view
data from a master node fails until a data node connects to it.
Data
nodes are active, which makes them more prone to network and hardware
failures. If a data node fails, the cluster can still operate normally
if the other data nodes are alive. If the master node or nodes fail,
then the cluster cannot operate. Data nodes can communicate with only
each other through master nodes. This behavior is why it is important
to consider having separate master nodes that can run on servers with
fewer chances for failure.
The same version of Java must be installed on all nodes in the cluster.
Using different versions of Java for
different nodes causes the cluster to fail.