Reputation: 151
I can't understand how does solr handle high availability in solrCloud. In its reference guide it pointed out that it uses CDCR to handle HA. But I think that this is an expensive strategy.
Can anyone tell what it actually handle HA and why is it an optimum way? Thanks a lot.
Upvotes: 0
Views: 2683
Reputation: 810
There are a few levels of HA - you need to ask yourself, what kinds of failures can I tolerate? Things like:
SolrCloud's basic cluster setup provides you the tools to cover #1-3 pretty easily. Add replicas, distribute them correctly among racks.
You can get #4, or even #5, using a single SolrCloud cluster spread around multiple data centers (Multi-AZ in AWS for #4, or Multi-Region in AWS for #5), but a single SolrCloud cluster doesn't have any locality awareness, so you need to understand that intra-cluster communication will often be cross-data-center, so the data centers really need to be low-latency between each other or your query latency will suffer badly.
SolrCloud's CDCR is a way to connect two or more independent SolrCloud clusters, and essentially create master/slave relationships between clusters. This gives you #4 or #5 without the penalty of cross-cluster traffic latency.
Upvotes: 4
Reputation: 1664
CDCR is not for high availability (HA), it's for disaster recovery (DR), I think you are confusing the two terms.
HA is planning for the server goes down. SolrCloud provides HA through using multiple replicas to host your data. In this scenario if one of the replicas (servers) in the collection goes down, the other ones can handle the load. Solr will automatically replicate data to all replicas for a given shard in the collection. See ReplicationFactor when making your collection.
DR is planning for the whole site being unavailable. This requires you to have another SolrCloud environment in a different data center and obviously requires you to send the data there too to keep both environments in sync. This is what CDCR is supposed to do, send all updates to another SolrCloud cluster in a different place.
Upvotes: 3