0

I am trying to connect multiple nodes in elastic search with 5 nodes. 2 nodes as master nodes and 3 as data nodes.

any effect if I use the replication as 2? performance will be good or not?

Nkosi
  • 235,767
  • 35
  • 427
  • 472
sweety
  • 23
  • 8

1 Answers1

0

First of all avoid keeping 2 master nodes, as it would be vulnerable to split brain problem.

How many will be efficient ?

Number of master/data nodes highly depends on your use case with the cluster. Try getting answers to questions like:

  1. Is your cluster index-heavy, search-heavy or both ?
  2. How much data are you doing to index, and with what frequency ?
  3. How many search request hits are you expecting ?

how to coordinate them

You don't need to. Elasticsearch's nodes are capable of doing so. Just ensure your elasticsearch.yml has all the node IPs mentioned (Under unicast hosts, I would prefer to avoid multicast). Use a configuration like this:

discovery.zen.ping.multicast.enabled: false 
discovery.zen.ping.unicast.hosts: ["<node1-ip:port>", "<node2-ip:port>", "<node3-ip:port>", "<node4-ip:port>"]

any effect if I use the replication as 2

Adding replicas would increase disk usage and heap size too. For 4 nodes, replication factor of 1 should be enough, unless you need high redundancy.

Because you've added spring-data-elasticsearch as a tag, I am assuming you want to use it as a Transport client with Elasticsearch. Check out this tutorial to get started.

Utkarsh Mishra
  • 480
  • 1
  • 7
  • 23