Facebooktwittergoogle_plusredditpinterestlinkedinmail

How to add new node in elasticsearch cluster?

Here is step by step guideline to add new node in existing elasticsearch cluster.

1) Elasticsearch Installation:

Install elasticsearch in new node. Elasticsearch version should be same as existing cluster nodes. If you are not aware then you may refer my these guideline

Install Elasticsearch 5.0 on RHEL / CentOS

2) Config changes:

update your elasticsearch.yml in these section.

– Change Cluster Name

# Must be existing cluster name
cluster.name: techieroop

– Configure node name and type of the node

node.name: newnode
# If add node only as a data node. If you want to add node as master then keep this value "true"
node.master: false
node.data: true

– Configure number of shard and replicas

# Shard and replica value should be same as existing node configuration.
index.number_of_shards: 5
index.number_of_replicas: 1

– Discovery settings

This is the most important configuration. Write your master node ip or host name(in my example it is 127.0.0.2) . So that your new node can join to your master node.

# 2. Configure an initial list of master nodes in the cluster
# to perform discovery when new nodes (master or data) are started:
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
discovery.zen.ping.unicast.hosts: ['127.0.0.2']

3) Restart the Elasticsearch node.

These are the important config changes we should do while installation Elasticsearch. After the successfully installation you can check new node through Cluster API.

curl -XGET 'http://localhost:9200/_nodes'

That’s it.

Add New Node in Elasticsearch Cluster Roopendra DevOPSElasticsearch,,
How to add new node in elasticsearch cluster? Here is step by step guideline to add new node in existing elasticsearch cluster.1) Elasticsearch Installation:Install elasticsearch in new node. Elasticsearch version should be same as existing cluster nodes. If you are not aware then you may refer my these guidelinehttp://techieroop.com/install-elasticsearch-5-on-centos-rhel/2) Config changes:update...
<h2>How to add new node in elasticsearch cluster?</h2> Here is step by step guideline to add new node in existing elasticsearch cluster.<strong>1) Elasticsearch Installation:</strong>Install elasticsearch in new node. Elasticsearch version should be same as existing cluster nodes. If you are not aware then you may refer my these guidelinehttp://techieroop.com/install-elasticsearch-5-on-centos-rhel/<strong>2) Config changes:</strong>update your <strong>elasticsearch.yml</strong> in these section.<strong>- Change Cluster Name</strong> <pre># Must be existing cluster name cluster.name: techieroop</pre> <strong>- Configure node name and type of the node</strong> <pre>node.name: newnode # If add node only as a data node. If you want to add node as master then keep this value "true" node.master: false node.data: true</pre> <strong>- Configure number of shard and replicas</strong> <pre># Shard and replica value should be same as existing node configuration. index.number_of_shards: 5 index.number_of_replicas: 1</pre> <strong>- Discovery settings</strong>This is the most important configuration. Write your master node ip or host name(in my example it is 127.0.0.2) . So that your new node can join to your master node. <pre># 2. Configure an initial list of master nodes in the cluster # to perform discovery when new nodes (master or data) are started: # #discovery.zen.ping.unicast.hosts: ["host1", "host2:port"] discovery.zen.ping.unicast.hosts: ['127.0.0.2']</pre> <strong>3) Restart the Elasticsearch node.</strong>These are the important config changes we should do while installation Elasticsearch. After the successfully installation you can check new node through <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html" target="_blank">Cluster API</a>. <pre class="programlisting prettyprint lang-js prettyprinted"><span class="pln">curl </span><span class="pun">-</span><span class="pln">XGET </span><span class="str">'http://localhost:9200/_nodes'</span></pre> That's it.
(Visited 11,364 times, 881 visits today)
Facebooktwittergoogle_pluslinkedinrss