# Define cluster and data replication in Elasticsearch 6.4

**URL:** <https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056>\
**Category:** Elasticsearch\
**Created:** [August 26, 2018, 6:41am UTC](https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056 "2018-08-26T06:41:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kolli\_dilip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kolli_dilip/32/33821_2.png) [@kolli\_dilip](https://discuss.elastic.co/u/kolli_dilip)\
**Post date:** [August 26, 2018, 6:41am UTC](https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056/1 "2018-08-26T06:41:14Z")

</div>

Hi

Can some one suggest me how to define the cluster details (ip's) and the data replication values in the new elasticsearch.yml, the below is my present yml

# ---------------------------------- Cluster -----------------------------------

# 

# Use a descriptive name for your cluster:

# 

cluster.name: mycluster

# 

# ------------------------------------ Node ------------------------------------

# 

# Use a descriptive name for the node:

# 

node.name: node-1

# 

# Add custom attributes to the node:

# 

#node.attr.rack: r1

# --------------------------------- Discovery ----------------------------------

# 

# Pass an initial list of hosts to perform discovery when new node is started:

# The default list of hosts is ["127.0.0.1", "[::1]"]

# 

discovery.zen.ping.unicast.hosts: ["ip1", "ip2"]

# 

# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

# 

#discovery.zen.minimum\_master\_nodes:

Thanks

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [August 26, 2018, 9:57pm UTC](https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056/2 "2018-08-26T21:57:18Z")

</div>

1. Please format your code as code, so it's properly readable 🙂
2. Replication is set per index (or globally or via a template) via the API. See [https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-create-index.html#create-index-settings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-create-index.html#create-index-settings) for the creation and [https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-update-settings.html#indices-update-settings](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/indices-update-settings.html#indices-update-settings) for update settings.
3. To form a cluster you need to configure the IP addresses / DNS names of the other nodes in `discovery.zen.ping.unicast.hosts`

---

<div class="post-metadata">

**Author:** ![kolli\_dilip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kolli_dilip/32/33821_2.png) [@kolli\_dilip](https://discuss.elastic.co/u/kolli_dilip)\
**Post date:** [August 28, 2018, 1:19am UTC](https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056/3 "2018-08-28T01:19:05Z")

</div>

Thank-you @xeraa, can you please let me know how to add security (xpack) configuration on elasticsearch.yml, i belive there has to be some added notations of xpack in the elasticsearch.yml, or is there any other way

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [August 28, 2018, 9:09am UTC](https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056/4 "2018-08-28T09:09:04Z")

</div>

Assuming you have the default package, which includes X-Pack, you need to start a trial and then enable security: [https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html)

Though this is another topic. If you have more questions about X-Pack or security, please start another discussion.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 25, 2018, 9:09am UTC](https://discuss.elastic.co/t/define-cluster-and-data-replication-in-elasticsearch-6-4/146056/5 "2018-09-25T09:09:10Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
