Live data from Hacker News

A Newbie’s Guide to Cassandra

blog.insightdatascience.com

11–20 of 26 posts

Re: A Newbie’s Guide to Cassandra

#11
post #6

These days I work with Cassandra on a daily basis. The company I am contracting with switched to Cassandra a while back for their primary data store. A few poor decisions later and they were spending tens of thousands of dollars a month running Cassandra in Azure. The cost was high because they modeled and queried their data like they were still using a SQL database which was incredibly inefficient. The lesson here i…

any recommendation and resources to read up on for when to use cassandra and how to design the schema?

When you need a key value store that can easily and mostly consistently and with low latency replicate across multiple data centers (or aws regions), in multi master setups.

In all other cases you'll probably be better off with Postgres, MySQL or similar.

Re: A Newbie’s Guide to Cassandra

#12

One thing that Cassandra doesn't have a good story of, and what intro guides continue to gloss over is the ops situation. I've recently moved some our largest Cassandra tables to BigTable for this reason. The compaction / repair / garbage collection death cycle is probably the most difficult thing to manage, and in the past 3 years of using Cassandra, managing it has gotten worse. Tools have been deprecated (like Ops…

Completely mirrors my experience with Cassandra. I think they'd have a real contender on their hands if operating a cassandra cluster didn't basically take a full time engineer. Its backup story is absolutely abysmal, and tooling is atrocious -- during a support incident a DataStax guy suggested I dump a table with sstable2json (or something like that) which generated a 100GB json file. When I pointed out that basically nothing could consume it because it was one 100GB hash object, he said "Yeah, I guess no one ever uses this stuff."

Re: A Newbie’s Guide to Cassandra

#13

This article does a massive disservice by using the pre-CQL Column Family and Row terminology. While it's the Cassandra data modelling I'm the most accustomed to personally, it causes endless confusion for users who find themselves in the CQL documentation trying to understand how it all maps to Primary Keys, Partition Keys, static columns, etc. This transition has been causing confusion for at least 5 years now, and…

As a recent user of Cassandra, I found exactly this to be a huge problem. Any type of googling would return too many different terms, and the relevance or context were completely missing so I was confused for a while, until I realized that the terms changed. The unintended consequence of such a quick change in terminology is that it makes for a very hard experience for newbies.

Re: A Newbie’s Guide to Cassandra

#14
post #8

CQL is the best and worst thing about Cassandra. The pro is that obviously it is very similar to SQL so it's easy to understand, the con is that C* is nothing like a RDBMS so you can be easily fooled into doing dumb/inefficient things with the nice CQL syntax. I think that Cassandra is best thought of as a fancy K/V store that lets extra data ride along with query results. Don't think of rows/columns at first, it wil…

I'd say it's absolutely the worst. For about ten seconds it seems like it's a nice higher level abstraction, but then you realize how that abstraction is hiding exactly what you care about: how your data maps to the underlying storage. Making it look like SQL was also a huge mistake because it gives the impression of a certain level of expressivity that it by no means has.

Re: A Newbie’s Guide to Cassandra

#15
post #12

One thing that Cassandra doesn't have a good story of, and what intro guides continue to gloss over is the ops situation. I've recently moved some our largest Cassandra tables to BigTable for this reason. The compaction / repair / garbage collection death cycle is probably the most difficult thing to manage, and in the past 3 years of using Cassandra, managing it has gotten worse. Tools have been deprecated (like Ops…

Completely mirrors my experience with Cassandra. I think they'd have a real contender on their hands if operating a cassandra cluster didn't basically take a full time engineer. Its backup story is absolutely abysmal, and tooling is atrocious -- during a support incident a DataStax guy suggested I dump a table with sstable2json (or something like that) which generated a 100GB json file. When I pointed out that basica…

As a long time Cassandra user: people use sstable2json all the time, but most people don't have 100gb sstables (or 20gb sstables that make 100gb of json)

Certainly something we can do better - how would you break it up? Adding a key to dump an individual partition to json?

Re: A Newbie’s Guide to Cassandra

#16
post #6

These days I work with Cassandra on a daily basis. The company I am contracting with switched to Cassandra a while back for their primary data store. A few poor decisions later and they were spending tens of thousands of dollars a month running Cassandra in Azure. The cost was high because they modeled and queried their data like they were still using a SQL database which was incredibly inefficient. The lesson here i…

any recommendation and resources to read up on for when to use cassandra and how to design the schema?

Check out their training:

https://academy.datastax.com/courses

Once you make it past the videos trying to sell you on NoSQL, they are incredibly informational.

Re: A Newbie’s Guide to Cassandra

#17
post #6

These days I work with Cassandra on a daily basis. The company I am contracting with switched to Cassandra a while back for their primary data store. A few poor decisions later and they were spending tens of thousands of dollars a month running Cassandra in Azure. The cost was high because they modeled and queried their data like they were still using a SQL database which was incredibly inefficient. The lesson here i…

any recommendation and resources to read up on for when to use cassandra and how to design the schema?

Use Cassandra when you need real time HA cross datacenter without having to manually fail over

Use Cassandra when you're going to need to grow our database cluster often and don't have tooling to handle resharding

Use Cassandra when you do millions of simple queries (per second), not a handful of complex JOINs

I've used Cassandra at 3 different employers now, and I can't imagine using anything else for many use cases, but there will always be some where it's the wrong choice.

Re: A Newbie’s Guide to Cassandra

#18
post #8

CQL is the best and worst thing about Cassandra. The pro is that obviously it is very similar to SQL so it's easy to understand, the con is that C* is nothing like a RDBMS so you can be easily fooled into doing dumb/inefficient things with the nice CQL syntax. I think that Cassandra is best thought of as a fancy K/V store that lets extra data ride along with query results. Don't think of rows/columns at first, it wil…

The clustering provides a ton of speed improvements if your data model can keep partition sizes small - especially if you use spinning disks, cassandras storage engine will make reading adjacent rows in a partition nearly free (especially with modern OS behavior like readahead).

Re: A Newbie’s Guide to Cassandra

#19

This article does a massive disservice by using the pre-CQL Column Family and Row terminology. While it's the Cassandra data modelling I'm the most accustomed to personally, it causes endless confusion for users who find themselves in the CQL documentation trying to understand how it all maps to Primary Keys, Partition Keys, static columns, etc. This transition has been causing confusion for at least 5 years now, and…

As a recent user of Cassandra, I found exactly this to be a huge problem. Any type of googling would return too many different terms, and the relevance or context were completely missing so I was confused for a while, until I realized that the terms changed. The unintended consequence of such a quick change in terminology is that it makes for a very hard experience for newbies.

It's not really that quick of a change - it's been in flight for something like 4 years? Maybe 5? And thrift is still supported until 4.0, so you can use the old style for quite some time.

Re: A Newbie’s Guide to Cassandra

#20
post #17
post #6

Earlier quoted context omitted.

any recommendation and resources to read up on for when to use cassandra and how to design the schema?

Use Cassandra when you need real time HA cross datacenter without having to manually fail over Use Cassandra when you're going to need to grow our database cluster often and don't have tooling to handle resharding Use Cassandra when you do millions of simple queries (per second), not a handful of complex JOINs I've used Cassandra at 3 different employers now, and I can't imagine using anything else for many use cases…

I like that your comment's denormalised for better use with Cassandra.
Post reply on HN