Created
September 3, 2010 19:59
-
-
Save PharkMillups/564464 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 15:40 <drewr> this is probably a faq, but why do R, W, and DW need to be less than n_val? | |
| 15:40 <drewr> if you have 10 replicas, what's the difference between assuring 9 values | |
| compared to 10? | |
| 15:41 <benblack> i don't understand the question | |
| 15:42 <benblack> why does r need to be less than n_val? | |
| 15:42 <benblack> because r says how many reads have to report success before | |
| results are returned to the client | |
| 15:42 <drewr> "In any case, your R, W, and DW values must be smaller than n_val | |
| if you want the request to | |
| succeed." --http://blog.basho.com/2010/03/19/schema-design-in-riak---introduction/ | |
| 15:42 <benblack> n_val is the number of replicas. | |
| 15:42 <benblack> if you ask for more successes than there are replicas, | |
| you will fail. | |
| 15:43 <benblack> is that not obvious? | |
| 15:43 <seancribbs> drewr: actually, R/W/DW=N means you can't tolerate any | |
| node failures | |
| 15:43 <drewr> I was thinking more like R == n_val | |
| 15:43 <seancribbs> even temporary partitions will cause failure | |
| 15:43 <seancribbs> i.e. timeouts, busy node, etc | |
| 15:44 <drewr> seancribbs: ah, so that's for the life of the cluster, | |
| makes sense | |
| 15:44 <benblack> huh? | |
| 15:44 <benblack> for the life of the cluster? | |
| 15:44 <seancribbs> for the sanity of your application, actually | |
| 15:44 <benblack> i fail at understanding question. | |
| 15:44 <siculars> +1 application sanity | |
| 15:45 <seancribbs> benblack: he wasn't asking about R/W/DW > N, but == N | |
| 15:46 <drewr> I wasn't considering that when you say you want 10 reads to agree | |
| you're saying you *always* want 10 reads to agree | |
| 15:46 <benblack> i did not understand the "for the life of the cluster" | |
| phrase | |
| 15:46 <benblack> drewr: as opposed to specifying r=10 and meaning r=9? | |
| 15:51 <drewr> benblack: I guess I was hoping for behavior where, eg, riak returns | |
| 8/10 because that's all that are available, but assures you that those 8 are equivalent | |
| 15:52 <drewr> but it can't really know for sure what "down" is | |
| 15:52 <drewr> maybe they return late | |
| 15:52 <benblack> "I guess I was hoping for behavior where, eg, riak returns | |
| 8/10 because that's all that are available, but assures you that those 8 are | |
| equivalent" <-- r=8 | |
| 15:52 <benblack> it doesn't hand you back whatever 8 show up and say "hope this helps!" | |
| 15:53 <benblack> unless you ahve configured things specifically otherwise, | |
| it is looking at 8, and handing you 1 (and repairing all 10 if they are out of sync) | |
| 15:55 <danlarkin> benblack: that means creating conflicts, if they're out of sync? | |
| 15:55 <danlarkin> s/conflicts/siblings/ | |
| 15:55 <benblack> depends on config. | |
| 15:55 <danlarkin> gotcha | |
| 15:55 <benblack> allow_multi is false by default | |
| 15:59 <benblack> drewr: are you familiar with how reading and writing | |
| works in dynamo? | |
| 16:00 <drewr> I have a general idea, | |
| but I'm apparently not at least this tall --> to ride the #riak | |
| 16:01 <benblack> the general idea is that writes are sent to all replicas | |
| (regardless of what you say in w=) | |
| 16:01 <benblack> and inconsistency is fixed up on read | |
| 16:02 <benblack> if r+w>n, the set of things written to and read from is guaranteed | |
| to overlap | |
| 16:02 <drewr> makes sense, although why have a w and not just a dw? | |
| 16:03 <drewr> seems like I would only care if copies were actually safe on disk | |
| during a write | |
| 16:03 <benblack> it is something you tune as needed. | |
| 16:03 <benblack> maybe having 3 copies in memory on 3 different machines is | |
| enough to meet your needs | |
| 16:03 <benblack> written to memory a few seconds later | |
| 16:03 <benblack> to disk, rather | |
| 16:04 <benblack> dw lets you trade even higher durability for a bit of performance | |
| 16:05 <benblack> the question is not whether it gets written to disk with w (instead of dw) | |
| 16:05 <benblack> it is whether that happens BEFORE returning success | |
| 16:05 <benblack> just as w = 2, n = 3 doesn't mean _only_ write to 2 of 3 | |
| 16:06 <benblack> does that make sense? | |
| 16:07 <drewr> yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment