Thanks for all your response but my doubt is which *Server:Port* should the
query be made as we don't know the crashed server or which server might
crash in the future(as any server can go down).

The only intention for writing this doubt is to get an idea about how the
query format for distributed search might work if any of the shard or
replica goes down.

Thanks


On Tue, Feb 18, 2014 at 11:22 PM, Shawn Heisey <s...@elyograg.org> wrote:

> On 2/18/2014 8:32 AM, Shawn Heisey wrote:
>
>> On 2/18/2014 6:05 AM, Vineet Mishra wrote:
>>
>>> *Shard 1                                                     Shard 2*
>>> localhost:8983                                            localhost:7574
>>> localhost:8900                                            localhost:7500
>>>
>>>
>>> I Indexed some document and then if I shutdown any of the replica or
>>> Leader
>>> say for ex- *localhost:8900*, I can't query to the collection to that
>>> particular port
>>>
>>> http:/*/localhost:8900*/solr/collection1/select?q=*:*
>>>
>>> Then how is it Fault Tolerant or how the query has to be made.
>>>
>> What is the complete error you are getting?  If you don't see the error
>> in the response, you'll need to find your Solr Logfile and look for the
>> error (including a large java stacktrace) there.
>>
>
> Good catch by Per.  I did not notice that you were trying to send the
> query to the server that you took down.  This isn't going to work -- if the
> software you're trying to reach is not running, it won't respond.  Think
> about what happens if you are sending requests to a server and it crashes
> completely.
>
> If you want to always send to the same host/port, you will need a load
> balancer listening on that port.  You'll also want something that maintains
> a shared IP address, so that if the machine dies, the IP address and the
> load balancer move to another machine.  Haproxy and Pacemaker work very
> well as a combination for this.  There are many other choices, both
> hardware and software.
>
> Per also mentioned the other option - you can write code that knows about
> multiple URLs and can switch between them.  This is something you get for
> free with CloudSolrServer when writing Java code with SolrJ.
>
> Thanks,
> Shawn
>
>

Reply via email to