If localhost:8900 is down but localhost:8983 contain replica of the same shard(s) that 8900 was running, all data/documents are still available. You cannot query the shutdown server (port 8900), but you can query any of the other servers (8983, 7574 or 7500). If you make a distributed query to collection1 you should still be able to find all of your documents, even though 8900 is down.

It is cumbersome to keep a list of crashed/shutdown servers, in order to make sure you are always querying a server that is not down. The information about what servers are running (and which are not) and which replica they run are all in ZooKeeper. So basically, just go look in ZooKeeper :-) Ahh, Solr has tool to help you do that - at least if you are running your client in java-code. Solr implement different kinds of clients (called XXXSolrServer - yes, obvious name for a client). There are HttpSolrServer that can do queries against a particular server (wont help you), there are LBHttpSolrServer that can do load-balancing over several HttpSolrServers (ahh, still not there), and there are CloudSolrServer that watches ZooKeeper in order to know what is running and where to send requests. CloudSolrServer uses LBHttpSolrServer behind the scenes. If you use CloudSolrServer as a client everything should be smooth and transparent with respect to querying when servers are down. CloudSolrServer will find out where to (and not to) route your requests.

Regards, Per Steffensen

On 18/02/14 14:05, Vineet Mishra wrote:
Hi All,

I want to have clear idea about the Fault Tolerant Capability of SolrCloud

Considering I have setup the SolrCloud with a external Zookeeper, 2 shards,
each having a replica with single collection as given in the official Solr
Documentation.

https://cwiki.apache.org/confluence/display/solr/Getting+Started+with+SolrCloud

                                    *Collection1*
                                      /            \
                                    /                \
                                  /                    \
                                /                        \
                              /                            \
                             /                               \
*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.

Regards


Reply via email to