lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "LBHttpSolrServer" by JackKrupansky
Date Mon, 11 Jun 2012 15:32:25 GMT
Dear Wiki user,

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

The "LBHttpSolrServer" page has been changed by JackKrupansky:
http://wiki.apache.org/solr/LBHttpSolrServer?action=diff&rev1=8&rev2=9

Comment:
Fixed typos and outdated info

  == 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.
+ LBHttpSolrServer or "Load Balanced 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.
  
  == How to use? ==
  {{{
- SolrServer lbHttpSolrServer = new LBHttpSolrServer("http://host1:8080/solr/","http://host2:8080/solr","http://host2:8080/solr");
+ SolrServer lbHttpSolrServer = new LBHttpSolrServer("http://host1:8080/solr/","http://host2:8080/solr","http://host3:8080/solr");
  //or if you wish to pass the HttpClient do as follows
  httpClient httpClient =  new HttpClient();
- SolrServer lbHttpSolrServer = new LBHttpSolrServer(httpClient,"http://host1:8080/solr/","http://host2:8080/solr","http://host2:8080/solr");
+ SolrServer lbHttpSolrServer = new LBHttpSolrServer(httpClient,"http://host1:8080/solr/","http://host2:8080/solr","http://host3:8080/solr");
  }}}
  
- This can be used like any other !SolrServer implementations.
+ This can be used like any other !SolrServer implementation.
  
  == How does the Load Balancing happen ? ==
- 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. 
+ 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 server is alive the request
succeeds , and if not it fails.
+ LBHttpSolrServer 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 (default val) to find if
it is alive. The interval can be changed using
+ LBHttpSolrServer keeps pinging the dead servers once a minute (default value) to find if
it is alive. The interval can be changed using
  {{{
   lbHttpSolrServer.setAliveCheckInterval(60*1000); //time in milliseconds
  }}}
  The ping is done in a separate thread. 
  
  == Can I add and remove servers ? ==
- Yes ,there are methods to add or remove servers to an existing LB!HttpSolrServer;
+ Yes, there are methods to add or remove servers to an existing LBHttpSolrServer;
  
  example:
  {{{
@@ -38, +38 @@

  }}}
  
  == When to use this ? ==
- This can be used as a software load balancer when you do not wish to setup an external load
balancer. The code is relatively new and the API is currently experimental
+ This can be used as a software load balancer when you do not wish to setup an external load
balancer.
- == Where can I get it ? ==
- It is currently being developed and the patch can be obtained from [[https://issues.apache.org/jira/browse/SOLR-844|SOLR-844]]
-  
  

Mime
View raw message