Elasticsearch Multi-machine cluster configuration

Source: Internet
Author: User

Nodes in a multi-machine cluster can be divided into master nodes and data nodes, using the Zen Discovery (Zen discovery) mechanism in the configuration file to manage different nodes. Zen Discovery is the default discovery mechanism that comes with ES, using multicast to discover other nodes. As soon as you start a new ES node and set the same name as the cluster, the node is added to the cluster.
Select 192.168.0.224 this machine as the master node, the configuration in Elasticsearch.yml is as follows:

cluster.namebropennode.namenode-224network.host0.0.0.0discovery.zen.ping.unicast.hosts192.168.0.224:9300discovery.zen.ping.multicast.enabledtrue

Note that the port is not 9200, but 9300. You can also not write ports.
Start the ES server on 192.168.0.224, and now it's just a single cluster.
Configure the same es,elasticsearch.yml in the 192.168.0.87 on this machine as follows:

cluster.namebropennode.namenode-87network.host0.0.0.0discovery.zen.ping.unicast.hosts192.168.0.224:9300discovery.zen.ping.multicast.enabledtrue

Then start es on the 192.168.0.87.
Visit http://192.168.0.224:9200/_plugin/head/
As shown, accessing the ES head plugin on the 192.168.0.224 server, you can see that the cluster named Bropen in ES has 4 nodes and 2 node-224,2 node-87.


The configuration was successful.

Elasticsearch Multi-machine cluster configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.