Is it possible to redirect the request from one server to another?


(Abhishek Jajoria) #1

Here is a problem , I have 3 ES nodes running , if one ES node gets down
can we serve request from other ES nodes automatically .


(David Pilato) #2

If you use Java Client it will redirect for you.
If not, you have to add a Proxy layer on top of your nodes (NGinx, ...).

HTH

Le 10 juillet 2012 à 11:35, jajoria abhishek jajoria.abhishek@gmail.com a
écrit :

Here is a problem , I have 3 ES nodes running , if one ES node gets down can
we serve request from other ES nodes automatically .

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(Abhishek Jajoria) #3

Is it possible in query to send the request to more than two server?

On Tue, Jul 10, 2012 at 3:08 PM, David Pilato david@pilato.fr wrote:

**

If you use Java Client it will redirect for you.

If not, you have to add a Proxy layer on top of your nodes (NGinx, ...).

HTH

Le 10 juillet 2012 à 11:35, jajoria abhishek jajoria.abhishek@gmail.com
a écrit :

Here is a problem , I have 3 ES nodes running , if one ES node gets down
can we serve request from other ES nodes automatically .

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(Lukáš Vlček) #4

Hi,

typically query gets executed on more servers (where index or relevant
shards are located) and aggregated on a single server and sent back to the
client. So the query is distributed automatically behind the scene.

Which server receives your query does not matter much (in most cases). Good
elasticsearch clients can check for running nodes in the cluster
periodically and notice if some nodes go away or are added into the
cluster. For example Java clients does that
http://www.elasticsearch.org/guide/reference/java-api/client.html

Regards,
Lukas

On Tue, Jul 10, 2012 at 12:26 PM, jajoria abhishek <
jajoria.abhishek@gmail.com> wrote:

Is it possible in query to send the request to more than two server?

On Tue, Jul 10, 2012 at 3:08 PM, David Pilato david@pilato.fr wrote:

**

If you use Java Client it will redirect for you.

If not, you have to add a Proxy layer on top of your nodes (NGinx, ...).

HTH

Le 10 juillet 2012 à 11:35, jajoria abhishek jajoria.abhishek@gmail.com
a écrit :

Here is a problem , I have 3 ES nodes running , if one ES node gets
down can we serve request from other ES nodes automatically .

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(Abhishek Jajoria) #5

I want to explain a more here I wanted to say that suppose one server is
down in a cluster and we are sending request request through
http://192.168.5.169:9200/raftaarsongs_sdi/_search but I want that as
other nodes are running the request can be serve from other nodes We are
not using java client here is there any other way

On Tue, Jul 10, 2012 at 4:05 PM, Lukáš Vlček lukas.vlcek@gmail.com wrote:

Hi,

typically query gets executed on more servers (where index or relevant
shards are located) and aggregated on a single server and sent back to the
client. So the query is distributed automatically behind the scene.

Which server receives your query does not matter much (in most cases).
Good elasticsearch clients can check for running nodes in the cluster
periodically and notice if some nodes go away or are added into the
cluster. For example Java clients does that
http://www.elasticsearch.org/guide/reference/java-api/client.html

Regards,
Lukas

On Tue, Jul 10, 2012 at 12:26 PM, jajoria abhishek <
jajoria.abhishek@gmail.com> wrote:

Is it possible in query to send the request to more than two server?

On Tue, Jul 10, 2012 at 3:08 PM, David Pilato david@pilato.fr wrote:

**

If you use Java Client it will redirect for you.

If not, you have to add a Proxy layer on top of your nodes (NGinx, ...).

HTH

Le 10 juillet 2012 à 11:35, jajoria abhishek jajoria.abhishek@gmail.com
a écrit :

Here is a problem , I have 3 ES nodes running , if one ES node gets
down can we serve request from other ES nodes automatically .

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(David Pilato) #6

If your server is down, nobody will listen on 192.168.5.169 port 9200. So, who
can redirect you ?
So, as Lukas said, if you use another client than the official Java client,
check that it supports also failover.

If you are using CURL or your own implementation of HTTP GET/POST/..., you have
to manage the failover on your side or to add a NGinx (or any proxy) on top of
your ES nodes.

David.

Le 10 juillet 2012 à 13:27, jajoria abhishek jajoria.abhishek@gmail.com a
écrit :

I want to explain a more here I wanted to say that suppose one server is down
in a cluster and we are sending request request through
http://192.168.5.169:9200/raftaarsongs_sdi/_search
http://192.168.5.169:9200/raftaarsongs_sdi/_search but I want that as
other nodes are running the request can be serve from other nodes We are not
using java client here is there any other way

On Tue, Jul 10, 2012 at 4:05 PM, Lukáš Vlček <lukas.vlcek@gmail.com
mailto:lukas.vlcek@gmail.com > wrote:

Hi,

typically query gets executed on more servers (where index or relevant
shards are located) and aggregated on a single server and sent back to the
client. So the query is distributed automatically behind the scene.

Which server receives your query does not matter much (in most cases).
Good elasticsearch clients can check for running nodes in the cluster
periodically and notice if some nodes go away or are added into the cluster.
For example Java clients does that
http://www.elasticsearch.org/guide/reference/java-api/client.html
http://www.elasticsearch.org/guide/reference/java-api/client.html

Regards,
Lukas

On Tue, Jul 10, 2012 at 12:26 PM, jajoria abhishek
<jajoria.abhishek@gmail.com mailto:jajoria.abhishek@gmail.com > wrote:
> > > Is it possible in query to send the request to more than two
> > > server?

 On Tue, Jul 10, 2012 at 3:08 PM, David Pilato <david@pilato.fr

mailto:david@pilato.fr > wrote:
> > > > If you use Java Client it will redirect for you.

   If not, you have to add a Proxy layer on top of your nodes

(NGinx, ...).

   HTH




   Le 10 juillet 2012 à 11:35, jajoria abhishek <

jajoria.abhishek@gmail.com mailto:jajoria.abhishek@gmail.com > a écrit
:

    > > > > > Here is a problem , I have 3 ES nodes running , if one
    > > > > > ES node gets down can we serve request from other ES
    > > > > > nodes automatically .
   > > > > 
   --
   David Pilato
   http://dev.david.pilato.fr/ <http://dev.david.pilato.fr/>
   Twitter : @dadoonet


 > > >    > >  > 

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(system) #7