5.1 Adding Servers to the Vertica, Kafka and ZooKeeper Cluster

This section details the procedure to move Vertica and its components from a single node cluster to a multiple node cluster.

NOTE:After adding Kafka and Vertica servers to their respective clusters, ensure that you run the Configure action to allocate appropriate memory for these services, on each of the servers added in the cluster. For more information, see Managing Vertica Memory Requirements.

5.1.1 Prerequisites

The prerequisites to be followed before adding servers to their individual clusters, are:

  • Ensure that the hardware and software configuration of the servers that are to be added are the same as the configuration of the existing server within that cluster.

  • Although there is no limit to the number of servers to be added in a cluster, ZENworks recommends a cluster size of 3 servers for ZooKeeper, Kafka and Vertica.

  • For Vertica, before adding servers, the Vertica cluster should already be enabled. For more information, see Procedure to Configure Vertica on a Single Server.

  • The broker or server that is to be added to the Kafka or Vertica cluster should not already be added to the cluster.

  • The server should be accessible and should have a specific host name.

5.1.2 ZooKeeper

Adding Servers to the ZooKeeper Cluster

  • Execute the following command to add nodes or servers to the cluster:

    zman server-role-zookeeper-add-server (zman srzas)

    The parameter to be specified is:

    • --servers: Specify a comma separated list of Primary Servers on which ZooKeeper should be enabled. You can specify the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers.

For example: zman server-role-zookeeper-add-server --servers=server2.microfocus.com,server3.microfocus.com,server4.microfocus.com,server5.microfocus.com

For more information on debugging ZooKeeper configuration issues, see ZooKeeper.

5.1.3 Kafka

To add more servers to the Kafka cluster, see Kafka Reference Guide.

5.1.4 Vertica

A summary of the steps to add servers to the Vertica cluster are as follows:

  1. Execute the command zman server-role-vertica-add-server (zman srvas) to add servers to the cluster. Specify the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers.

    For example: zman server-role-vertica-add-server --servers=server2.microfocus.com,server3.microfocus.com

  2. Restart the ZENserver and ZENloader services.

  3. Execute the command zman server-role-vertica-update-cluster (zman srvuc) to update the K factor.

    For example: zman server-role-vertica-update-cluster -k=1

Adding Servers

  • Execute the following command to add servers to the existing cluster and specify a comma separated list of servers by specifying the DNS, GUID or path of the server object (server, server folder or server group) relative to /Devices/Servers.

    zman server-role-vertica-add-server (zman srvas)

    For example: zman server-role-vertica-add-server --servers=server2.microfocus.com,server3.microfocus.com

    IMPORTANT:After adding servers to the Vertica cluster, ensure that you restart the ZENserver and ZENloader services on all the Primary Servers.

Updating the K Factor

  • Execute the following command to update the K factor.

    zman server-role-vertica-update-cluster (zman srvuc)

    This command lets you update the K-safety factor in the existing cluster. The K-safety value determines the number of replicas of data that should exist in a cluster. The K safety sets the fault tolerance for the Vertica cluster, where K can be set as 0 or 1. Specify a value based on the number of nodes in the cluster, which is measured as 2k+1. For example: if the K factor is 1, then you need to have a minimum of 3 nodes. Vertica recommends a K-safety value of 1. For more information on K-safety, see Glossary.

    For example: zman server-role-vertica-update-cluster -k=1

    After adding a broker to the Vertica cluster, ensure that you run the Configure action to allocate appropriate memory. For more information, see Managing Vertica Memory Requirements.

Why the odd number of nodes are recommended?

The odd number is generally recommended for clusters because the replication factor is computed based on a 2k + 1 formula.

K can be any value starting from 0. This means for a K value 0, the replication factor will be (2*0+1 =1), which means replication will happen to 1 server.

Let us assume that the K value is 1, then the replication factor becomes 3. So, replication can never happen to an even number of nodes. This is the reason we recommend an odd number of nodes, but we do not stop from adding any number of nodes as it’s harmless, but a 2 node cluster with 2 servers in the zone is not relevant.