The dual hosts clusters nodes instances are located on two physical or logical hosts. First host holds router and manager nodes and data nodes. Second host – only data nodes. That is minimal multi-host configuration. The n-type cluster configured the same way as single node – two replica node instances, but located on different hosts – one on first and one on second host. The m-type cluster configured the same way as n-type – two shard node instances one on first and one on second host.
Configuration files for first and second hosts are different. For the first host of n-type:
for the second host n-type:
For the first host of m-type:
and for the second host of m-type:
For the first host of r-type:
and for the second host of r-type:
To activate the dual host configuration some changes need to be done for current_cfg.sh file on each host different way. In each of three sections for n-, m- and r-type clusters the default single host configuration line need to be commented out and correspondent first or second host line of the dual host configuration comment need to be removed. In result for the first
host only three lines titled as:
"Multi-host configuration for first host of dual hosts"
need to be uncommented and for the second host – only three lines titled as:
"Multi-host configuration for second host of dual hosts"
need to be uncommented for the n-, m- and r-type of clusters.
Configuration files need to be modified to specify the IP addresses of hosts. Configuration files for the first host “c112_localhost_?0_2h_cfg.sh” need to be modified with definition of the second host IP address:
instead of the 10.0.0.2 the second host IP address need to be specified. Configuration files for the second host: “c112_localhost_?0_2h-data_cfg.sh” need to be modified with definition of the manager host IP address:
instead of the 10.0.0.1 the first host IP address need to be specified.
The node_pool1.ini file used for all data nodes need to be modified to specify own IP address and notification service IP address. Line:
the localhost need to be replaced with this host IP address (different for the first and second hosts). Line:
the 127.0.0.1 need to be replaced with the first host server IP address, because the DTM service located on that host.
After all that modifications was done cluster nodes can be started on both hosts in any order (first or second host).
To start all nodes of n- and m-type clusters on first host use:
and on the second host use:
because no router or manager nodes here.
To stop all nodes on the first host use:
and on the second host: