0

Im working in a "home project solr"(aka PoC), using Solr as search engine. I'm using master/slave configuration in two distinct servers, so(in my plans) my search would be avaiable even if the main server comes down but, the problem is:

Im currently doing my search at url

http://mainSOLRSERVER:8080/search/select/?q=*:*

Is there any built-in solr component to check if this url is OK, and if is not, change to another server

http://redundancySOLRSERVER:8080/search/select/?q=*:*?

I aint using Solrj in my application, its a simple ASP.Net application using xml parsing in Solr's results.

The only thing I came up with, would be send a ping request to Solr's main server and, if returns not ok, build the request with the redundancy URL, but that would be necessary in every single search request, is that the right approach?

Thanks in advance!

4

1 回答 1

0

在生产场景中,您将使用负载均衡器。

您不需要 ping。直接在主 URL 上执行查询,如果返回错误,则查询备用 URL。如果这也会引发错误,那么你就不走运了。

于 2013-07-22T19:25:38.313 回答