# Searching across 2 nodes on 2 different servers

**URL:** <https://discuss.elastic.co/t/searching-across-2-nodes-on-2-different-servers/20213>\
**Category:** Elasticsearch\
**Created:** [October 13, 2014, 9:35am UTC](https://discuss.elastic.co/t/searching-across-2-nodes-on-2-different-servers/20213 "2014-10-13T09:35:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Morley](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@Phil\_Morley](https://discuss.elastic.co/u/Phil_Morley)\
**Post date:** [October 13, 2014, 9:35am UTC](https://discuss.elastic.co/t/searching-across-2-nodes-on-2-different-servers/20213/1 "2014-10-13T09:35:20Z")

</div>

Please pardon my ignorance in advance, I'm new to Elasticsearch.

I have set up a cluster across two servers. One server is master and data,  
the other just data.

Let's call my first server 'server1', my other server 'server2' and my  
index 'address'.

If i want to search my address index, I can use the following URL:

[http://server1:9200/address/\_search](http://server1:9200/address/_search)

This returns data fine.

I can also use:

[http://server2:9200/address/\_search](http://server2:9200/address/_search)

and this returns data fine, too.

My query is as follows - Is there URL which I can use where Elasticsearch  
chooses which server to return data from automatically, instead of having  
to manually specify either server1 or server2?

I will be drastically increasing the number of indexes shortly and I'd like  
Elasticsearch to automate which node it selects depending on whether the  
other is in use, etc.

Is this possible?

Many thanks,  
Phil.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 14, 2014, 1:23am UTC](https://discuss.elastic.co/t/searching-across-2-nodes-on-2-different-servers/20213/2 "2014-10-14T01:23:06Z")

</div>

No, you need to hit an end point that points to a server and then ES handle  
where to get the data.  
You could setup a cname entry that round robins to each server, but that is  
outside the scope of ES.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 13 October 2014 20:35, Phil Morley [philip.morley@gmail.com](mailto:philip.morley@gmail.com) wrote:

> Please pardon my ignorance in advance, I'm new to Elasticsearch.
> 
> I have set up a cluster across two servers. One server is master and data,  
> the other just data.
> 
> Let's call my first server 'server1', my other server 'server2' and my  
> index 'address'.
> 
> If i want to search my address index, I can use the following URL:
> 
> [http://server1:9200/address/\_search](http://server1:9200/address/_search)
> 
> This returns data fine.
> 
> I can also use:
> 
> [http://server2:9200/address/\_search](http://server2:9200/address/_search)
> 
> and this returns data fine, too.
> 
> My query is as follows - Is there URL which I can use where Elasticsearch  
> chooses which server to return data from automatically, instead of having  
> to manually specify either server1 or server2?
> 
> I will be drastically increasing the number of indexes shortly and I'd  
> like Elasticsearch to automate which node it selects depending on whether  
> the other is in use, etc.
> 
> Is this possible?
> 
> Many thanks,  
> Phil.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6d95c9c0-ae71-4238-a8a7-2bdbca46c7c2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZXhnugjJDEEkjzrghXOCGOijkAuWkE%2BX%2B9Q25dy8u-Yg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZXhnugjJDEEkjzrghXOCGOijkAuWkE%2BX%2B9Q25dy8u-Yg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:56am UTC](https://discuss.elastic.co/t/searching-across-2-nodes-on-2-different-servers/20213/3 "2017-07-06T00:56:29Z")

</div>


