0
votes

If I were to set up my cluster on elastic with 3 master node and 5 to 10 data nodes which node IP address should I actually use in my application to query elastic. I am following Hot warm architecture for elastic but from what I have understood is the master node should always be responsible for handling an incoming request and then coordinating that request to further node in the cluster and to operate on the final response.

So should I only use master node IP addresses in my application to talk with the cluster?

2
Can you share your use cases, why you are considering the hot warm arch? - user156327
basically data is more than the size of 10TB and it will grow eventually hence we are considering Hot warm architecture - Mehul Chachada

2 Answers

1
votes

First of all, you shouldn't be using individual IP to connect to a cluster as that can potentially become your single point of failure, if the node goes down. You should have a load balancing URL that connects to data nodes or coordinator nodes to aid your search.

Also, it looks like, you are having dedicated master nodes. Typically for larger size cluster, its not recommended to use master as the search coordinator and should ideally have them in master eligible only role to ensure cluster stability. So you will be left with option of using either data nodes or coordinator only nodes to accept your search requests.

If you are using clients like JEST, NEST etc and not directly using the http endpoint for _search, then you also have option to provide a list of IPs/hostname to form a connection pool.

-1
votes

Like @askids mentioned, always connect to elasticsearch using the standard. Elastic itself provides clients. https://www.elastic.co/guide/en/elasticsearch/client/index.html

You have not mentioned the clients you are going to be using. If your client is based on Java, use the Elasticsearch's Low-Level or High Level Rest Client. These clients are wrappers on apache http client and provide you all the boilerplate logic of handling connections and other features. You can also add Sniffer support to it.

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/sniffer.html