Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change 
notification.

The following page has been changed by NoblePaul:
http://wiki.apache.org/solr/LBHttpSolrServer

------------------------------------------------------------------------------
  == What is LBHttpSolrServer? ==
- LB!HttpSolrServer or "!LoadBalanced !HttpSolrServer" is just a wrapper to 
!CommonsHttpSolrServer. This is useful when you have multiple !SolrServers and 
the requests need to be Load Balanced among them. it offers automatic failover 
when a server goes down and it detects when the server comes back up.
+ LB!HttpSolrServer or "!LoadBalanced !HttpSolrServer" is just a wrapper to 
!CommonsHttpSolrServer. This is useful when you have multiple !SolrServers and 
the requests need to be Load Balanced among them. It offers automatic failover 
when a server goes down and it detects when the server comes back up.
- 
- TODO: address "Why would I use LBHttpSolrServer instead of existing hw/sf 
LB-s".
  
  == How to use? ==
  {{{
@@ -19, +17 @@

  This is a dumb round-robin Load Balancing .First request goes to 'host1' then 
to 'host2' and then'host3' and it starts with 'host1' again. 
  
  == How does failover happen? ==
- LB!HttpSolrServer does not keep pinging the servers to know if they are 
alive. If a request to a server fails by an Exception then the host is taken 
off the list of live servers and moved to a 'dead server list' and the request 
is resent to the next live server. This process is continued till it tries all 
the live servers. If atleast one serveris alive the request succeeds , and if 
not it fails.
+ LB!HttpSolrServer does not keep pinging the servers to know if they are 
alive. If a request to a server fails by an Exception then the host is taken 
off the list of live servers and moved to a 'dead server list' and the request 
is resent to the next live server. This process is continued till it tries all 
the live servers. If atleast one server is alive the request succeeds , and if 
not it fails.
  
  == How does it know if a server has come back up ? ==
- LB!HttpSolrServer keeps pinging the dead servers once a minute as a to find 
if it is alive. The interval can be changed using
+ LB!HttpSolrServer keeps pinging the dead servers once a minute (default val) 
to find if it is alive. The interval can be changed using
  {{{
- lbHttpSolrServer.setAliveCheckInterval(60*1000); //time in millis
+  lbHttpSolrServer.setAliveCheckInterval(60*1000); //time in seconds
  }}}
- The ping is done not in a separate thread, it is done in a thread which made 
a normal request.
+ The ping is done ikn a separate thread. 
  
  == Can I add and remove servers ? ==
  Yes ,there are methods to add or remove servers to an existing 
LB!HttpSolrServer;

Reply via email to