Elasticsearch is a distributed system, and a cluster contains one or more nodes. In this section, we will discuss how to add a new node to the cluster.
Let's say we have two servers with IP addresses 192.168.0.1 and 192.168.0.2.
Follow the instructions laid down next to start a two-node cluster:
- Install Elasticsearch in the first server. Please follow the instructions in the Installing Elasticsearch section in Chapter 2, Setting up Elasticsearch and Kibana.
- Open the configuration file in the first server, and make the following changes:
-
- Change the cluster name under the cluster section:
cluster.name: es-dev
-
- Change the node name under the node section:
node.name: elasticsearch1
-
- Change the host address to bind under the network section:
network.host: 192.168.0.1
-
- Set the address...