SOLR-12223: Update docs to add Initial Startup section for bi-directional updates

This commit is contained in:
Cassandra Targett 2018-06-11 14:55:21 -05:00
parent efd1690a06
commit fc3f642692
1 changed files with 51 additions and 15 deletions

View File

@ -272,17 +272,12 @@ Buffering is designed to augment maintenance windows. The following points shoul
== Initial Startup == Initial Startup
.CDCR Bootstrapping === Uni-Directional Approach
[TIP]
====
Solr 6.2 added the functionality to allow CDCR to replicate the entire index from the Source to the Target data centers on first time startup as an alternative to the following procedure. For very large indexes, time should be allocated for the initial synchronization if this option is chosen.
====
This is a general approach for initializing CDCR in a production environment based upon an approach taken by the initial working installation of CDCR and generously contributed to illustrate a "real world" scenario. This is a general approach for initializing CDCR in a production environment. It's based upon an approach taken by the initial working installation of CDCR and generously contributed to illustrate a "real world" scenario.
* CDCR is used to keep a remote disaster-recovery instance available for production backup.
* Customer uses the CDCR approach to keep a remote disaster-recovery instance available for production backup. This is a uni-directional solution. * This example as 26 clouds with 200 million assets per cloud (15GB indexes). Total document count is over 4.8 billion.
* Customer has 26 clouds with 200 million assets per cloud (15GB indexes). Total document count is over 4.8 billion.
** Source and Target clouds were synched in 2-3 hour maintenance windows to establish the base index for the Targets. ** Source and Target clouds were synched in 2-3 hour maintenance windows to establish the base index for the Targets.
As usual, it is good to start small. Sync a single cloud and monitor for a period of time before doing the others. You may need to adjust your settings several times before finding the right balance. As usual, it is good to start small. Sync a single cloud and monitor for a period of time before doing the others. You may need to adjust your settings several times before finding the right balance.
@ -292,7 +287,7 @@ As usual, it is good to start small. Sync a single cloud and monitor for a perio
* Upload the modified `solrconfig.xml` to ZooKeeper on both Source and Target as appropriate, see the examples above. * Upload the modified `solrconfig.xml` to ZooKeeper on both Source and Target as appropriate, see the examples above.
* Sync the index directories from the Source collection to Target collection across to the corresponding shard nodes. `rsync` works well for this. * Sync the index directories from the Source collection to Target collection across to the corresponding shard nodes. `rsync` works well for this.
+ +
For example, if there are 2 shards on collection1 with 2 replicas for each shard, copy the corresponding index directories from: For example, if there are two shards on collection1 with 2 replicas for each shard, copy the corresponding index directories from:
+ +
[width="75%",cols="45,10,45"] [width="75%",cols="45,10,45"]
|=== |===
@ -302,11 +297,11 @@ For example, if there are 2 shards on collection1 with 2 replicas for each shard
|shard2replica2Source |to |shard2replica2Target |shard2replica2Source |to |shard2replica2Target
|=== |===
* Start the ZooKeeper on the Target (DR) side. * Start ZooKeeper on the Target (DR).
* Start the SolrCloud on the Target (DR) side. * Start SolrCloud on the Target (DR).
* Start the ZooKeeper on the Source side. * Start ZooKeeper on the Source.
* Start the SolrCloud on the Source side. As a general rule, the Target (DR) side of the SolrCloud should be started before the Source side. * Start SolrCloud on the Source. As a general rule, the Target (DR) should be started before the Source.
* Activate the CDCR on Source instance using the CDCR API: * Activate CDCR on Source instance using the CDCR API:
+ +
[source,text] [source,text]
http://host:port/solr/<collection_name>/cdcr?action=START http://host:port/solr/<collection_name>/cdcr?action=START
@ -319,6 +314,47 @@ http://host:port/solr/collection_name/cdcr?action=DISABLEBUFFER
+ +
* Re-enable indexing. * Re-enable indexing.
=== Bi-Directional Approach
[TIP]
====
When using the bi-directional approach, it is highly recommended to enable CDCR on both cluster-collections before any indexing has taken place.
====
Based on the same example from uni-directional solution, let's walk through the necessary steps:
* Before you begin, stop or pause any indexing processes. This is best done during a small maintenance window.
* Stop the SolrCloud instances in both Cluster 1 and Cluster 2.
* Upload the modified `solrconfig.xml` to ZooKeeper on both Cluster 1 and Cluster 2 as appropriate, see the examples above in the section <<Bi-Directional Updates>>.
* If documents were indexed prior to this exercise, sync the index directories from the Cluster 1 collection to the Cluster 2 collection to the corresponding shard nodes or vice versa. The `rsync` utility works well for this if it's available on your server. Check to be sure the the updated index is copied across.
+
For example, if there are 2 shards on collection 'cluster1' (the updated collection) with 2 replicas for each shard, copy the corresponding index directories from:
+
[width="75%",cols="45,10,45"]
|===
|shard1replica1cluster1 |to |shard1replica1cluster2
|shard1replica2cluster1 |to |shard1replica2cluster2
|shard2replica1cluster1 |to |shard2replica1cluster2
|shard2replica2cluster1 |to |shard2replica2cluster2
|===
* Start ZooKeeper on Cluster 1.
* Start ZooKeeper on Cluster 2.
* Start SolrCloud on Cluster 1.
* Start SolrCloud on Cluster 2.
* If not present, create respective collections in both Cluster 1 and Cluster 2.
* Activate the CDCR on Cluster 1 and Cluster 2 instance using the CDCR API:
+
[source,text]
http://host:port/solr/<collection_name>/cdcr?action=START
+
* Disable the buffer on Cluster 1 and Cluster 2:
+
[source,text]
http://host:port/solr/collection_name/cdcr?action=DISABLEBUFFER
+
* Re-enable indexing.
== ZooKeeper Settings == ZooKeeper Settings
With CDCR, the Target ZooKeepers will have connections from the Target clouds and the Source clouds. You may need to increase the `maxClientCnxns` setting in `zoo.cfg`. With CDCR, the Target ZooKeepers will have connections from the Target clouds and the Source clouds. You may need to increase the `maxClientCnxns` setting in `zoo.cfg`.