3

We have huge application built , as number of users going on high which is the best option and which is useful to our application such unintrrupted support to the application need to be provided.

Is Solr replication good ?? Is Solr Sharding is good ??

1 Answers1

12

They do different things. You might want both. You might also want to look into SolrCloud which was introduced with Solr 4.0 (you'll want to use the most recent version though, as the feature set has evolved). But back to replication vs sharding:

Replication makes sure that the same part of the index is spread out to several servers. Instead of having just one index, you have two. Or three. Or maybe five. All are identical and contain the same set of documents. You've got redundancy, and can spread your reads across all servers.

Sharding splits an index across several servers. Documents A and B might be on server 1, while documents C and D might be on server 2. There are no redundancy, but the index size can be larger than what a single server would handle.

You can then start replicating your shards to get redundancy, and keep track of which indices are replicated where, how many replications you want of each shard / index / etc. This is a simplified explanation of what SolrCloud tries to do for you.

When it comes to the best option, there is not really much to say. Setting up replication is very easy, so if your index can fit on one server and is read heavy / query oriented, it won't require much work to get it up and running. Performance is always application specific, so you'll have to start somewhere to get a baseline of what way scaling makes sense. Just make sure it's easy to reindex your content if you want to experiment with different configurations.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84