On 9/8/2014 9:54 PM, Salman Akram wrote:
> We have a redundant data center in case the primary goes down. Currently we
> have 1 master and multiple slaves on primary data center. This master also
> replicates to a slave in secondary data center. So if the primary goes down
> at least the read only part works. However, now we want writes to work on
> secondary data center too when primary goes down.
> 
> - Is it possible in SOLR to have Master - Master?
> - If not then what's the best strategy to upgrade a slave to master?
> - Naturally there would be some latency due to data centers being in
> different geographical locations so what are the normal data issues and
> best practices in case primary goes down? We would also like to shift back
> to primary as soon as its back.

SolrCloud would work, but only if you have *three* datacenters.  Two of
them would need to remain fully operational.  SolrCloud is a true
cluster -- there is no master.  Each of the shards in a collection has
one or more replicas.  One of the replicas gets elected to be leader,
but the leader designation can change.

The reason that you need three is because of zookeeper, which is the
software that actually maintains the cluster and handles leader
elections.  A majority of zookeeper nodes (more than half of them) must
be operational for zookeeper to maintain quorum.  That means that the
minimum number of zookeepers is three, and in a three-node system, one
can go down without disrupting operation.

One thing that SolrCloud doesn't yet have is rack/datacenter awareness.
 Requests get load balanced across the entire cluster, regardless of
where they are located.  It's something that will eventually come, but I
don't have any kind of estimate for when.

Thanks,
Shawn

Reply via email to