Elasticsearch cross-network segment group cluster

Source: Internet
Author: User

Elasticsearch is a very popular full-text search engine, but online tutorials are mostly used for the first time, and there are no advanced usage demos. This encounter need to cross-network segment network problems, their own exploration of the document for a long time, found to be feasible, so began to do an experiment, the final experiment success. Automatic discovery and networking are implemented under cross-network segments.

A total of three nodes are running, one node IP is 192.168.45.67, the other two node IP is 172.20.5.161 three files configuration file has been changed to the following configuration file, successively start three nodes, logging in the back.

192.168. After the 45.67 node is started, the self-use of 9300 as the communication port, the self as the master node exists.

172.20. After the 5.161 node is started, the self-use 9300 as the communication port, found that the hosts list has a master exists, master to join the cluster.

172.20. After the 5.161 node is started, it is found that 9300 is occupied, since the use of 9301 as the communication port, found that the hosts list of master exists, Master joins it in the cluster.

192.168.45.67:9300 adding logs

172.20.5.161:9300 adding logs

172.20.5.161:9301 add

Elasticsearch-1.5.2/config/elasticsearch.yml need to modify the division into

Discovery.zen.ping.multicast.enabled and Discovery.zen.ping.unicast.hosts, modified as follows:

################################## Discovery ################################### Discovery Infrastructure ensures Nodes can found within a cluster# and master node is elected.  Multicast discovery is the default.# Set to ensure a node sees N other master eligible nodes to be considered# operational Within the cluster.  This should is set to a quorum/majority of# the master-eligible nodes in the cluster.# #discovery. Zen.minimum_master_nodes: # Set the time to wait for ping responses from other nodes when discovering.# Set this option to a higher value on a SLO W or congested network# to minimize Discovery failures:# #discovery. zen.ping.timeout:3s# For more information, see# <HT tp://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html># Unicast Discovery allows to explicitly control which nodes would be is used# to discover the cluster. It can be used when multicast are not present,# or to restrict the cluster communication-wise.## 1. Disable Multicast DIscovery (enabled by default): # Discovery.zen.ping.multicast.enabled:false# # 2. Configure an initial list of master nodes in the cluster# to perform discovery when new nodes (master or data) is star ted:#discovery.zen.ping.unicast.hosts: ["192.168.45.67", "172.20.5.161:9300"]# EC2 discovery allows to use AWS EC2 APIs in order to perform discovery.## we have to install the Cloud-aws plugin for EN Abling the EC2 discovery.## For more information, see# 

Please see the Chinese notes for the configuration:

Http://www.tuicool.com/articles/Nryu2i

Elasticsearch cross-network segment group cluster

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.