olivere / elastic

Deprecated: Use the official Elasticsearch client for Go at https://github.com/elastic/go-elasticsearch

Home Page:https://olivere.github.io/elastic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load balance between multiple master nodes

amirEBD opened this issue · comments

Which version of Elastic are you using?

elastic.v7 (for Elasticsearch 7.9)

Please describe the expected behavior

As I give multiple master nodes to olivere client. what will happend?
Will it balance the load between masters (coordinaitors) or just choose one of them at the very first connection and continue the rest of it?

By default, it will do round robin between the nodes that a) are identified during the Sniffing process (if enabled) or b) you specify at startup (if sniffing is disabled). You can read more about all these things in the wiki.

In practice, you'd better leave load balancing up to DNS or Elasticsearch (by means of a dedicated coordinating node, I think).