Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra or SOLR? What gives better performance to frond end read queries?

My team has asked me to choose between Cassandra and SOLR for faster response @ frond end queries. I told them that Cassandra is NOSQL db thing while SOLR is indexing thing. But then they say that we can push our complete db to SOLR (like using SOLR as db) or we can just use Cassandra with SOLR. All confused.

Amount of data we are dealing is like 1 Billion spread over 4 MySQL table(fetched using joins) and we get only read queries from the website. We dont need FULL TEXT SEARCH

I think something in which SOLR cannot be beated easily is is its full text search feature but then we dont need it on our case.

So what else SOLR has which Cassandra cannot provide and what does Cassandra has that it can replace SOLR in our particular case?

In other words, who is going to perform better? Cassandra alone? SOLR as a db alone? Or both together? And most importantly why and why not?

Its really important for me to backup my choice with strong point as if why one is better than other during my next team meeting.

And thanks in advance.

EDIT:

  • SOLANDRA is not an option because it not that mature and no more maintained I guess
  • DataStax is not an option because SOLR feature is provided in only Enterprise Edition
like image 724
codersofthedark Avatar asked Apr 17 '12 03:04

codersofthedark


People also ask

Are reads fast in Cassandra?

Cassandra is excellent for write operations but not so fast on read operations. Both are rather fast but Cassandra does write operation faster. Cassandra has benefits being +HA (no SPOF) + having tuneable Consistency. Cassandra is very fast writing bulk data in sequence and reading them sequentially.

Why Cassandra Read is fast?

Writing to in-memory data structure is much faster than writing to disk. Because of this, Cassandra writes are extremely fast!


1 Answers

If you don't need Solr's full-text search capabilities, there's very little reason to choose it over Cassandra, in my opinion.

(Disclosure: I work for DataStax.)

Operationally, handling a Cassandra cluster will be much simpler due to the Dynamo-based architecture. Sharding Solr can be quite painful, which is one of the big reasons why we at DataStax built search into DSE; it's something that a lot of people want to avoid. I'm not trying to sell you on DSE, just pointing out the downside to Solr.

For example, when you want to change the number of shards with Solr, you have to create and build an entirely new index. You have to worry about deadlock with a Solr cluster. There are several other limitations: http://wiki.apache.org/solr/DistributedSearch

You haven't said much about what kind of queries you need to be able to support. Adding that info would get you better answers.

like image 102
Tyler Hobbs Avatar answered Sep 20 '22 12:09

Tyler Hobbs