SolrCloud shard replication is useful for customers that either want data resiliency, and/or fail-over in a multi-server environment.
After collection has been created
- Increase the maximum number of shards per node (if needed). This example increases the max shards per node to 6:
- Browse to Solr Admin > Collections
- Click the ViaWorksCloud collection
- For each shard in the right column, click the shard to expand it.
- Click Add Replica
- From the Node drop down, choose which node the replica should be stored on. For data resiliency and fail-over protection, it's best to choose a remote node.
- Click Create Replica
- Do this for each shard to replicate the entire collection
Alternatively, the replicas can be created using the Solr API:
- For each shard, run a ADDREPLICA command:
- http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=ViaWorksCloud&shard=shardX (where shardX is shard1, shard2, shard3 ...)
- To specify which node the replicated shard is created on, add the &node= parameter and the IP:port_solr of the node
Search and indexing performance will be degraded while the shards are replicated. How long this operation takes depends on how much data you have.