Connecting to cluster for querying?


(Andrei) #1

If I run a cluster of ElasticSearch nodes, can I connect to any node
in order to issue a query? How should I deal with failover if that
node is down - move onto the next one in the node list?

-Andrei


(Shay Banon) #2

Yes, you can issue a query to any node, and it will execute it, if a node
fails, you can move to the next node. The cluster state API returns for all
the nodes the addresses it exposes, so you can build dynamic round robin /
failover (thats what the perl client does).

-shay.banon

On Sat, Sep 18, 2010 at 8:46 PM, Andrei andrei@zmievski.org wrote:

If I run a cluster of ElasticSearch nodes, can I connect to any node
in order to issue a query? How should I deal with failover if that
node is down - move onto the next one in the node list?

-Andrei


(Andrei) #3

Right, though have to find a healthy node first to issue the cluster
health
query against. :slight_smile:

-Andrei

On Sep 18, 2:50 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Yes, you can issue a query to any node, and it will execute it, if a node
fails, you can move to the next node. The cluster state API returns for all
the nodes the addresses it exposes, so you can build dynamic round robin /
failover (thats what the perl client does).

-shay.banon


(Shay Banon) #4

Yes, though you can create a list of all the nodes when things are good, so
you know who to fall over to.

On Sat, Sep 18, 2010 at 8:58 PM, Andrei andrei@zmievski.org wrote:

Right, though have to find a healthy node first to issue the cluster
health
query against. :slight_smile:

-Andrei

On Sep 18, 2:50 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Yes, you can issue a query to any node, and it will execute it, if a node
fails, you can move to the next node. The cluster state API returns for
all
the nodes the addresses it exposes, so you can build dynamic round robin
/
failover (thats what the perl client does).

-shay.banon


(system) #5