Your Apache NiFi cluster should include either three or five ZooKeeper nodes (see Set up a NiFi Cluster). This procedure describes how to add additional nodes that do not run ZooKeeper. You can add additional nodes without restarting the existing NiFi instances.
To add an additional node to your NiFi cluster
Open the file ./conf/nifi.properties
and set or review the following properties:
Property | Description |
---|---|
nifi.cluster.is.node
|
Set this property to true . |
nifi.state.management.embedded.zookeeper.start
|
Set this property to false . |
nifi.zookeeper.connect.string
|
A comma-separated list of host names and ports, for connecting to ZooKeeper on your ZooKeeper nodes. For example, host1:4881,host2:4881,host3:4881 . |
nifi.web.http.port
|
The NiFi HTTP Port. This is the port that you would use to open the Apache NiFi web interface. |
nifi.cluster.node.protocol.port
|
Specify any free port above 1024. |
nifi.cluster.load.balance.port
|
Specify any free port above 1024. |
Open the file ./conf/state-management.xml
and set the Connect String
property (in the ZooKeeper section) to the same value you set for nifi.zookeeper.connect.string
in the nifi.properties
file. For example:
<property name="Connect String">host1:4881,host2:4881,host3:4881</property>
Start Apache NiFi on this node.
Apache NiFi starts and the new node joins the cluster.