On 7/17/2011 11:03 PM, pravesh wrote:
Hi,
SOLR has sharding feature, where we can distribute single search request
across shards; the results are collected,scored, and, then response is
generated.
Wanted to know, what happens in case of failure of specific shard(s),
suppose, one particular shard machine is down? Does the request fails, or,
is this handled gracefully by SOLR?
The request will fail. There were two patches that I knew of for
dealing with this, both of which are very old. It looks like there has
been another one since then, much more recent.
Originally available:
https://issues.apache.org/jira/browse/SOLR-1143
https://issues.apache.org/jira/browse/SOLR-1537 (incorporates
functionality of SOLR-1143)
Available since I last looked:
https://issues.apache.org/jira/browse/SOLR-2253
That said ... in a production setting, you are better off having a full
redundant chain of servers than relying on a stopgap measure like this.
IMHO, and the HO of many others, if a server failure does not leave you
fully functional (including access to your full index), you haven't done
enough. Most of the time, temporary reduced performance is acceptable,
reduced functionality is not.
When I first set things up, I was using SOLR-1537 on Solr 1.5-dev. By
the time I went into production, I had abandoned that idea and rolled
out a stock 1.4.1 index with two complete server chains, each with 7
shards. After asking this mailing list and internally discussing it, we
decided that partial index access on machine failure was not good
enough. If it takes a little longer than normal to find things, users
may still stick around. If they cannot find what they are looking for
at all, they'll go somewhere else.
Hope this helps!
Shawn