Will it be good to have a DNS with Load balancer for elastic cluster?

Hi,
I would like to understand the best approach I need to leverage.

I have a 3-node cluster and made all 3 of them as discoverable as master. When I initiated indexing upon providing URL of all 3 nodes, only one node got picked up and the index was replicated to other nodes.

If I am setting up a common DNS URL for this cluster of 3 nodes and enable round robin as Load Balancing, I assume the indexing will be distributed among all 3 nodes. Will it cause any issues/conflict to the data based on the above scenario due to round-robin?

What would be the best approach that Elastic recommends:

  1. Listing the url of all 3 nodes where the system let pick one master and the data replicate to other nodes.
  2. Setting up a common DNS for the cluster and enable round-robin as LB type where for the LB handles the traffic.
  3. Setting up a common DNS for the cluster and have a single node as master and other nodes as data nodes.
  4. Any other options?

Kindly share your thoughts and appreciate your help in advance!

Hi @IamGuna

Yes in general putting a load balancer in front of your data nodes is generally a good practice.

I think you should read these.

I think there is some confusion on how a cluster operates

In your cluster you will have

3 Nodes
Each will be Master Eligible and Data Nodes (also ingest, coordinator etc..)
At any one time there will only be 1 Elected Master Node, which node that is is solely determined by the cluster.

A master node role, keeps track and manages the cluster state it is not responsible for the indexing of a document. If you have a large cluster you would have Dedicated Master Nodes and you would not send ingestion to Master Nodes.

SOOOO with all that said...

  1. Listing the url of all 3 nodes where the system let pick one master and the data replicate to other nodes.

Yes.

Master does not replicate data please see the the reading and writing document above.

Yes for small 3 nodes, put LB in front to distribute the ingestion load, where they data / which node it is written to is determined where the primary shard and replica are located.

1 Like