Re:How Do I Cassandra?
by dpritchett on Tuesday November 22, 2011 @11:52AM
(#3266240)
Attended Rick's presentation last night. It was so choice. If you have the means, I highly recommend taking one in.
The md5 hashing to shards around a keyspace ring and the read/write quora were particularly interesting. Definitely going to be browsing the Reddit source (https://github.com/reddit/reddit) for ideas on how to use Cassandra.
Re:How Do I Cassandra?
by rbranson on Tuesday November 22, 2011 @11:52AM
(#3266239)
FYI -- the presentation says "temporal data" is a bad use case for Cassandra, but that's a misuse of the word temporal. "Ephemeral data" is a better way to say that.
Re:How Do I Cassandra?
by mikeryan on Tuesday November 22, 2011 @12:33PM
(#3266428)
<< META COMMENT >>
I'm always surprised when someone's raw slide decks, for an interesting presentation make it to the front page of HN. I get so little from just an 85 slide deck, especially decks with a slide like
Re:How Do I Cassandra?
by forgotAgain on Tuesday November 22, 2011 @01:05PM
(#3266564)
What works as a nice intro with audio doesn't always work standalone. The first dozen slide don't match the title. Live, it can be a way to warm up a crowd but with just the deck it's a drag.
Re:How Do I Cassandra?
by slyall on Tuesday November 22, 2011 @04:07PM
(#3267366)
I read a lot of slide decks. I go to very few conferences (live in NZ) and videos of talks are often not available or of poor quality (camera stays on presenter or slides obscured). Also I can go through a slide deck in a few minutes while a 1 hour presentation takes an hour to view the whole thing and a significant amount of time for me to decide if it is uninteresting.
Obviously you don't get much out of presetations that are just 20 flickr photos and 10 words but for decks like this you can learn a bit.
Since many presentations are "read" by more people than "watched" I'd hope that authors will pay more attention into improving the readability of their presentations (perhaps by releasing more wordy versions).
Re:How Do I Cassandra?
by checker on Tuesday November 22, 2011 @12:53PM
(#3266505)
I got a lot out of your slides. Sometimes it can be difficult to discern the point of the slide without audio, but I felt that your slides communicated the point pretty well. Thanks for sharing!
Re:How Do I Cassandra?
by rbranson on Tuesday November 22, 2011 @03:13PM
(#3267131)
Timestamps were chosen over vector clocks intentionally.
"...the primary use case for classic vector clocks of merging non-conflicting updates to different fields w/in a value is already handled by cassandra breaking a row into columns."
Re:How Do I Cassandra?
by thomaslangston on Tuesday November 22, 2011 @03:14PM
(#3267138)
If I remember correctly from the talk (I was one of the lucky attendees), Rick claimed basically it is not an issue. Standard time synchronization methods are sufficient for the problem domains Cassandra is meant to address.
Re:How Do I Cassandra?
by thomaslangston on Tuesday November 22, 2011 @03:21PM
(#3267163)
No. Unfortunately audio/video recording equipment seems to be sparse in the Memphis user group communities. As far as I know we only have one group that does it regularly. http://www.justin.tv/launchmemphis
If anyone has a good, cheap solution for recording/streaming user group presentations, please share.
Re:How Do I Cassandra?
by dpritchett on Tuesday November 22, 2011 @12:20PM
(#3266375)
I didn't see any recording equipment last night, sorry. It's a shame too - Rick's presentation style and the Q&A added a lot. You can try to pin him down in #cassandra on FreeNode if you like.
Re:How Do I Cassandra?
by nowarninglabel on Tuesday November 22, 2011 @01:44PM
(#3266763)
I'm used to attending and giving presentations that are a bit outlandish, but this is gimmicky enough that I started losing track of actually learning anything out of this.
I'm sure it's better in-person or with a recording though.
Re:How Do I Cassandra?
by rbranson on Tuesday November 22, 2011 @02:27PM
(#3266966)
The ranges are assigned by a per-node token. With 4 nodes like the cluster shown in the slides, you'd space the tokens apart appropriately for 25% of the range on each node.
When you add a node, you need to decide if you want to rebalance the cluster by moving every node's token a bit so that every node's range consumes 20% of the keyspace, or if you just want to quickly alleviate load by splitting a single node's traffic in half by assigning the new node's token half way into an existing node's range.
Decommissioning a node works the same way, but in reverse.
Re:How Do I Cassandra?
by rbranson on Tuesday November 22, 2011 @07:04PM
(#3268053)
That's a 24-hour-news-network-pundit grade straw man he's created there. The replication strategy used by Cassandra is sourced from the Amazon Dynamo design (shared with Riak and Voldemort) and is intentional. It's not a bug; it's the way it's supposed to operate. There are many large scale distributed systems built on this replication strategy that have excellent durability track records -- Amazon S3 is one of them.
The back pressure argument is laughable. In Cassandra, a write consistency of greater than ONE will ensure the data is replicated to more than one node before acknowledging to the client.
Re:How Do I Cassandra?
by grout on Tuesday November 22, 2011 @08:16PM
(#3268276)
You use argument from authority ("It's based on Dynamo, which is made by Amazon, so you know it's good!") while accusing me of a strawman for reporting my own personal experiences.
Good thing there is no god, or you should have to watch out for lightning.
Re:How Do I Cassandra?
by rbranson on Tuesday November 22, 2011 @08:33PM
(#3268336)
Actually, this is empirical evidence of the validity of this approach gained through observation of successful, real-world implementations. I'm not saying it's good purely because it's from Amazon or because any one person said it was good, but that there are many successful large-scale systems built using these principles that do not suffer the durability issues from your hypothesis.
While not proof in the scientific sense, this type of evidence is used as a basis for scientific theories that explain much of what we know about the world.
However, I still look forward to your detailed, rigorous rebuttal of my arguments in the previous comment.
Re:How Do I Cassandra?
by jbellis on Tuesday November 22, 2011 @06:04PM
(#3267857)
That boils down to Chip's opinion that master/slave is the One True Way to do replication, despite its many demonstrated disadvantages. I see your Chip Salzenberg and raise you a Werner Vogels: http://www.allthingsdistributed.com/2008/12/eventually_consi...
Re:How Do I Cassandra?
by grout on Tuesday November 22, 2011 @08:14PM
(#3268272)
sigh And here your PR guy wanted to fly me to New York to talk to you. Obviously the effort would have been wasted.
Replication events are too important to be designed to fall on the floor. I want at any given time to know approximately how far behind replication is; I want primary write events to block until replication is at least durably scheduled; and if I pause or slow operation and wait for replication to catch up, I want to know that it _is_ caught up without holes. Cassandra fails utterly to meet these minimal requirements.
Master/slave queue is not the only way to meet these needs, but unless a replacement can fulfill the requirements, I can't responsibly switch.
Re:How Do I Cassandra?
by jbellis on Tuesday November 22, 2011 @08:41PM
(#3268361)
When I'm learning about a new architecture, I like to take the position of, "let's assume the authors aren't idiots. If they're not, why would they have designed things this way?"
With that in mind, let me pose this question to you.
I submit that by this point, Amazon (among others) has convincingly demonstrated that this approach can indeed achieve a high degree of reliability.
If you agree, then I suggest that you read through the Dynamo and Eventually Consistent papers again with the "let's assume these people aren't idiots" approach, and see if you can spot what this architecture offers to achieve a similar goal to your "wait for replication to catch up" design.
Re:How Do I Cassandra?
by grout on Wednesday November 23, 2011 @05:46PM
(#3272122)
You're not idiots, and neither are Amazon. But using a Dynamo style design safely requires overprovisioning and performance loss. W=1 speed is your bait; reality is the switch.
Re:How Do I Cassandra?
by nicktelford on Wednesday November 23, 2011 @06:00AM
(#3269610)
Your primary argument seems to be that in the event a "replication event" fails, the data is lost forever - this is simply not true.
I the event a replica is unavailable for a write, the co-ordinator stores that write itself and delivers it to the replica once it becomes available again (Hinted Handoff, see the oft linked paper on eventual consistency).
This makes read-repair far less of an issue, usually only as a mechanism to ensure consistency of requests that occur in the window between the node becoming available and the hint being delivered.
It's called eventual consistency for a reason. Writes don't just go missing. If you're uncomfortable with the "eventual" aspect of the replication model then you're better off with a database that sacrifices availability for improved consistency guarantees.
The md5 hashing to shards around a keyspace ring and the read/write quora were particularly interesting. Definitely going to be browsing the Reddit source (https://github.com/reddit/reddit) for ideas on how to use Cassandra.
The ring is first explained in Section 4.2 Partitioning Algorithm.
I'm always surprised when someone's raw slide decks, for an interesting presentation make it to the front page of HN. I get so little from just an 85 slide deck, especially decks with a slide like
DATA MODEL
I gotcha column family ratttt heeeeyyyaahhh!
Obviously you don't get much out of presetations that are just 20 flickr photos and 10 words but for decks like this you can learn a bit.
Since many presentations are "read" by more people than "watched" I'd hope that authors will pay more attention into improving the readability of their presentations (perhaps by releasing more wordy versions).
Y u no vector clocks?
"...the primary use case for classic vector clocks of merging non-conflicting updates to different fields w/in a value is already handled by cassandra breaking a row into columns."
See https://issues.apache.org/jira/browse/CASSANDRA-580
If anyone has a good, cheap solution for recording/streaming user group presentations, please share.
I'm sure it's better in-person or with a recording though.
When you add a node, you need to decide if you want to rebalance the cluster by moving every node's token a bit so that every node's range consumes 20% of the keyspace, or if you just want to quickly alleviate load by splitting a single node's traffic in half by assigning the new node's token half way into an existing node's range.
Decommissioning a node works the same way, but in reverse.
More detailed info: http://www.datastax.com/docs/1.0/operations/cluster_manageme...
Seriously, it's a much more pleasant slide-consuming experience for your great slides.
http://chip.typepad.com/weblog/2011/08/why-cassandra-is-unfi...
The back pressure argument is laughable. In Cassandra, a write consistency of greater than ONE will ensure the data is replicated to more than one node before acknowledging to the client.
Good thing there is no god, or you should have to watch out for lightning.
While not proof in the scientific sense, this type of evidence is used as a basis for scientific theories that explain much of what we know about the world.
However, I still look forward to your detailed, rigorous rebuttal of my arguments in the previous comment.
Replication events are too important to be designed to fall on the floor. I want at any given time to know approximately how far behind replication is; I want primary write events to block until replication is at least durably scheduled; and if I pause or slow operation and wait for replication to catch up, I want to know that it _is_ caught up without holes. Cassandra fails utterly to meet these minimal requirements.
Master/slave queue is not the only way to meet these needs, but unless a replacement can fulfill the requirements, I can't responsibly switch.
With that in mind, let me pose this question to you.
Is using a Dynamo architecture (http://www.allthingsdistributed.com/2007/10/amazons_dynamo.h...) for S3 "irresponsible" of Amazon?
I submit that by this point, Amazon (among others) has convincingly demonstrated that this approach can indeed achieve a high degree of reliability.
If you agree, then I suggest that you read through the Dynamo and Eventually Consistent papers again with the "let's assume these people aren't idiots" approach, and see if you can spot what this architecture offers to achieve a similar goal to your "wait for replication to catch up" design.
I the event a replica is unavailable for a write, the co-ordinator stores that write itself and delivers it to the replica once it becomes available again (Hinted Handoff, see the oft linked paper on eventual consistency).
This makes read-repair far less of an issue, usually only as a mechanism to ensure consistency of requests that occur in the window between the node becoming available and the hint being delivered.
It's called eventual consistency for a reason. Writes don't just go missing. If you're uncomfortable with the "eventual" aspect of the replication model then you're better off with a database that sacrifices availability for improved consistency guarantees.