Cluster setup
This section covers configuring a three-node Elasticsearch cluster and loading it with Twitter data.
Cluster configuration
Setting up an Elasticsearch cluster is simple. All nodes in the cluster should be on the same local network and have the same version of Java and Elasticsearch installed. For our cluster, we'll use three Ubuntu Linux 14.04 virtual hosts: elasticsearch-node-01
, elasticsearch-node-02
, and elasticsearch-node-03
.
After installing Elasticsearch on all hosts, update the elasticsearch.yml
configuration file on each, as follows:
The configuration for
elasticsearch-node-01
is as follows:cluster.name: my_elasticsearch_cluster node.name: "elasticsearch-node-01" discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["elasticsearch-node-02", "elasticsearch-node-03"] index.routing.allocation.disable_allocation: false cluster.routing.allocation.enable : all
The configuration for
elasticsearch-node-02
is as follows:cluster.name: my_elasticsearch_cluster...