You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Steven White <sw...@gmail.com> on 2016/10/06 15:02:50 UTC

Upgrading to SolrCloud

Hi everyone,

Currently, we are on Solr 5.2 and use 1 core and none of the cloud
features.  We are planning to upgrade to Solr 6.2 and utilize SolrCloud not
because our data need to scale (single core with no cloud is doing just
fine on our index of 2 million records and about 15 gb index size) but
because some of our customers want high availability.

We currently have a component that uses SolrJ and Solr REST API to admin
Solr (adding new fields, changing handlers, etc. to customize Solr's
schema) based on customer's DB schema before we start indexing.

If we switch over to SolrCloud:

1) Will our existing usage of SolrJ and REST API still work as-is?
2) Not all of our customers need that high availability of Solr.  For
those, single server and single index will do just fine.  In this case, can
I configure SolrCloud to single server with single core?  When I do so, am
I impacting performance of Solr?

I'm thinking performance will be impacted because there is now an extra
layer my requests will have to go through.

Thanks in advanced.

Steve

Re: Upgrading to SolrCloud

Posted by Jan Høydahl <ja...@cominvent.com>.
> 6. okt. 2016 kl. 17.02 skrev Steven White <sw...@gmail.com>:
> If we switch over to SolrCloud:
> 
> 1) Will our existing usage of SolrJ and REST API still work as-is?
Yes, probably

> 2) Not all of our customers need that high availability of Solr.  For
> those, single server and single index will do just fine.  In this case, can
> I configure SolrCloud to single server with single core?  When I do so, am
> I impacting performance of Solr?

If you have a collection with only one shard, there’s no overhead during indexing
or querying. You would use CloudSolrClient which will talk to ZK but that
does not happen for every request, so it will be smart enough to send the
requests directly to the node that should serve them.

> I'm thinking performance will be impacted because there is now an extra
> layer my requests will have to go through.

Nope. But note that when you create collections, Solr may assign you a 
node which is already used by other collections, and that may potentially
cause performance issues if the node is not powerful enough to drive both
collections. But you can also choose what node to use when creating the 
collection

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com


Re: Upgrading to SolrCloud

Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/6/2016 9:02 AM, Steven White wrote:
> We currently have a component that uses SolrJ and Solr REST API to admin
> Solr (adding new fields, changing handlers, etc. to customize Solr's
> schema) based on customer's DB schema before we start indexing.
>
> If we switch over to SolrCloud:
>
> 1) Will our existing usage of SolrJ and REST API still work as-is?

Generally speaking, if you change from a variant like HttpSolrClient
connecting to a non-cloud install to CloudSolrClient connecting to a
cloud install, the rest of your SolrJ code will *probably* work with no
other changes.  That will largely depend on the config/schema being
similar between the cloud install and the non-cloud install.

> 2) Not all of our customers need that high availability of Solr.  For
> those, single server and single index will do just fine.  In this case, can
> I configure SolrCloud to single server with single core?  When I do so, am
> I impacting performance of Solr?

You can have collections in the cloud that have a single shard and a
single replica -- only one core in the entire collection.  These kinds
of collections are vulnerable to failures if the server with the single
core goes down, of course.  Aside from that, they work just like
collections with more shards and/or more replicas.

The "old" http API still works even in cloud mode, using collection
names instead of core names in the URL -- with the added advantage that
you can send such requests to ANY node in the cloud, and they will find
their way to the correct location.  Updates are more efficient if they
are sent to the correct shard leader, which CloudSolrClient does by default.

Thanks,
Shawn