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