Building a NiFi cluster
In this section, you will build a two-node cluster on different machines. Just like with MiNiFi, however, there are some compatibility issues with the newest versions of NiFi and Zookeeper. To work around these issues and demonstrate the concepts, this chapter will use an older version of NiFi and the pre-bundled Zookeeper. To build the NiFi cluster, perform the following steps:
- As root, or using sudo, open your
/etc/hosts
file. You will need to assign names to the machines that you will use in your cluster. It is best practice to use a hostname instead of IP addresses. Your hosts file should look like the following example:127.0.0.1 localhost ::1 localhost 127.0.1.1 pop-os.localdomain pop-os 10.0.0.63 nifi-node-2 10.0.0.148 nifi-node-1
- In the preceding hosts file, I have added the last two lines. The nodes are
nifi-node-1
andnifi-node-2
and you can see that they have different IP addresses. Make these changes in the hosts file for each machine...