lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <jan....@cominvent.com>
Subject Re: Question: Does Zookeeper/SolrCloud handle the failover?
Date Fri, 06 Jan 2017 14:31:33 GMT
Hi,

That should work well, as long as the list of Solr nodes is fairly constant. Using ZK your
client will always have the correct list of nodes and will always avoid unnecessary hops.
With a hardcoded list of node names you’ll need to update your LB when you make changes
to your cluster, and there will be more hops, but that is perfectly acceptable and neglectible
for many users.

Another solution is to talk to ZK from your .NET application code directly, just to pull out
the cluster state for each collection, and thus be able to pick nodes yourself in an intelligent
way...

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 6. jan. 2017 kl. 15.20 skrev Mike Linnetz <Mike.Linnetz@theprimacy.com>:
> 
> Thanks for the reply!
> What you describe makes sense.
> 
> I have another question as I'd like to present my team all of the options.
> 
> As an alternative to using SolrNetCloud to load balance, couldn't I just configure my
network load balancer to distribute requests among my cloud instances?  As I understand it,
Zookeeper and SolrCloud should take care of propagating any updates across all nodes in a
collection if a request is routed to any node in the collection.
> Is there anything I'm missing such that that solution would not work?
> 
> Thanks,
> Mike
> 
> 
> -----Original Message-----
> From: Mikhail Khludnev [mailto:mkhl@apache.org] 
> Sent: Thursday, January 5, 2017 4:26 PM
> To: general@lucene.apache.org
> Subject: Re: Question: Does Zookeeper/SolrCloud handle the failover?
> 
> Hello, Mike!
> 
> As far as I've got, you need to connect to SolrCloud (Zookeeper) via
> Solr.Net library.
> Here is the reference to the fork where it's done.
> https://github.com/mausch/SolrNet/issues/174#issuecomment-143697474
> Let me know if you need more info.
> 
> On Thu, Jan 5, 2017 at 8:50 PM, Mike Linnetz <Mike.Linnetz@theprimacy.com>
> wrote:
> 
>> Hello,
>> 
>> I am new to SolrCloud and Zookeeper, and there's a piece of the puzzle on
>> which I'm unclear.  I don't understand whether/how SolrCloud and Zookeeper
>> handles the high availability aspect.  That is, once I have the Zookeeper
>> ensemble set up, now how do I reference the collection in a
>> "high-availability" fashion so that if one Solr instance is down, it will
>> automatically route to another instance?
>> 
>> Am I thinking that SolrCloud does more than it actually does?  That is,
>> could I instead handle all Load Balancing outside of Zookeeper, and just
>> use our company's network load balancer to route/distribute traffic for a
>> single consolidated URL:port to the different actual Solr Instances/Ports?
>> 
>> Here's more details in case it helps:
>> I have an ASP.NET application which uses SolrNet to query and write to a
>> standalone Solr instance.  In my program , I specify the hostname:port of
>> my Solr instance:
>>                Startup.Init<SolrDoc>("hostname:port");
>> This setup was used for development and testing.
>> 
>> Now, for production, I need to implement Solr in a H.A. fashion so that I
>> don't have a single point of failure.    So, following Apache's
>> documentation, I understand that the solution would be to set up an
>> external Zookeeper Ensemble.
>> So, let's say I set up a new Zookeeper Ensemble (three instances). Let's
>> also say I have three Solr instances, #shards = 2, #replicas per shard = 2.
>> 
>> Once I have the Zookeeper ensemble set up, now how do I reference the
>> collection?
>> Previously, my code references a single standalone Solr instance, "
>> http://solrserver1:9983". What do I point it to now?
>> 
>> If I point it to any of the three Solr instances, and if that instance I'm
>> referencing goes down, it means the request would fail, right?
>> 
>> I read similar questions online, for example https://groups.google.com/
>> forum/#!msg/solrnet/-PeaGrLAMtw/pAfxuoYLVnIJ, and the answer seems to be
>> that SolrNet doesn't support this type of HA.  So, do I understand
>> correctly that the load balancing aspect needs to be handled on the
>> client-side (or via a network load balancer), not the zookeeper/solrcloud
>> server side?
>> 
>> Thanks,
>> Mike
>> 
>> 
>> 
>> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message