Vijay Tiwary
Vijay Tiwary

Reputation: 151

Solr cloud - creating collection using implicit routing

I am not being able to decide that out of the two ways of creating collection in solr cloud which one I should go for.

I want that - I should be able to add/create shard to a existing collection on the fly so that I can scale up the cluster as and when the index grows. Since this is possible only in collection created through implicit routing so I am planning to use it.

I just want to know if I have collection (created through implicit routing) then how it will perform in terms of query time? Will it be same as when compared to collection created through solr default routing? Is there any drawbacks in terms performance?

Upvotes: 0

Views: 2322

Answers (1)

Tomer
Tomer

Reputation: 1108

Solr query time is set by the slowest shard response time.

When you use implicit routing you responsible for the number of document in each shard, and if your routing strategy is poor you would end up with unbalanced shards which will perform slower.

When you use Solr default strategy Solr decide where to send the documents according to docId.hash() % (#shards), usually that shards are balanced and you will get better performance.

Both strategies are good depends on your use case, I would choose implicit routing in case of multi tenancy (shard per tenant) of if would need to add shards each month/day. Usually I go with the default routing and scale up by multipling the number of nodes x 2 (I know it's a costly solution).

I suggested another scale out option in the following JIRA SOLR-5025 you are welcome to add your comments or vote: https://issues.apache.org/jira/browse/SOLR-5025

Upvotes: 1

Related Questions