Comments (6)
Why not add some examples, while we're at it? I found my information by skimming through some slides found on slideshare. For example:
http://www.slideshare.net/hemulen/introducing-riak (the information therein would make for a great documentation)
http://www.slideshare.net/seancribbs/introduction-to-riak-red-dirt-ruby-conf-training (starting from slide 122, for example).
In my notes, I have the following entries:
OBSERVATIONS:
One of the nice things with Riak itβs that it let you defined the N, R and W value for each operation. These values are:
N: the number of replicas of each value to store; objects are written to multiple partitions (default: 3)
R: the number of replicas required to perform a read operation or how many replicas need to agree (default: 2)
W: the number of replicas needed for a write operation, how many replicas to write before returning a successful response (default: 2)
This is also called the "Dynamo Quorums". The dynamo math is as follows:
N - R: read fault tolerance
N - W: write fault tolerance
Example: N = 4, R = 2, W = 2
N - R = 2 (nodes can be down and Riak can still perform READ's)
N - W = 2 (nodes that will receive hinted WRITE's)
R = W (read your write consistency)
R + W > N (strong consistency)
N can vary per bucket.
R, W can vary per operation.
Example:
PUT /riak/bucket
Content-type: application/json
{"props":{"nval":5}}
==> bucket.n_value = 5
Request-time quorums (ruby-like syntax):
GET /riak/bucket/key?r=1
==> bucket.get('key', :r => 1)
PUT /riak/bucket/key?w=4
==> object.store('key', :w => 4)
Other quorums:
DW: Durable writes (stored to disk: how many replicas to commit to durable storage before returning a successful response, default: 0)
RW: quorum for deletes (delete is a write!, default: 0)
from basho_docs.
Adding an example for PW might be difficult so it might be good to link to an "advanced usage" area.
An example of when PW is relevant is in the face of network partitions. If you have a network partition, splitting out, say, a single node from your cluster, it's possible you could write to that node as usual and not know the difference. The node will produce fallback partitions and accepts writes, even, say, with a w=2 value.
There's many bad scenarios, here, but even in the face of locking on the client side, if a partition continues then you can either lose data (if using LWW strategy) or you can come up with siblings even if your operations were not conflicting.
Using PW, potentially, can prevent some of these problems by failing fast for the client letting it know "hey, I don't have enough real owners of this data piece to complete the operation." In many scenarios, this is desirable behavior, especially when writing non-CDRT or immutable data.
from basho_docs.
Issue #225 and its associated PR address much of this.
from basho_docs.
I think that this doc and several others adequately address this. Closing.
from basho_docs.
Where are things like PR and PW covered, just out of curiosity? Is there a page that goes over those?
from basho_docs.
These are very much under-documented. I'm working on that now, primarily in
a more comprehensive pull request #916. Those changes in particular haven't
yet been pushed, but I'm working right now on significantly improving the
docs on replication and conflict resolution.
For the time being, this blog post does a pretty good job of explaining:
http://basho.com/riaks-config-behaviors-part-2/. I'll be using it for help
in writing the new docs.
On Mon, Mar 17, 2014 at 7:57 PM, Dan Ostrowski [email protected]:
Where are things like PR and PW covered, just out of curiosity? Is there a
page that goes over those?Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-37895103
.
from basho_docs.
Related Issues (20)
- Documentation Error: Riak KV HTTP API [JIRA: DOC-790] HOT 1
- Missing link in Dotted Version Vector section [JIRA: DOC-791]
- Configuration Reference: duplicate table entry [JIRA: DOC-793]
- Configuration Reference: anti-entropy setting name [JIRA: DOC-794]
- Add a check to `rake build` to confirm Gems and Gem versions. [JIRA: DOC-803]
- Bitcask FAQ section has malformed links. [JIRA: DOC-829]
- Java Client - Certificate Based Authentication [JIRA: DOC-842]
- Extra `curl` on Pagination Section of Search [JIRA: DOC-843]
- where can I find the goog.csv file mentioned in the docs basho riak 1.2.0 tutorial? [JIRA: DOC-854] HOT 2
- Need some examples on getting bucket type properties in /riak/kv/2.2.1/developing/api/http/get-bucket-props/ [JIRA: DOC-859] HOT 1
- Missing information from Cluster Operations --> Handoff [JIRA: DOC-885]
- Link to bug reporting/code contribution page broken
- http://docs.basho.com is broken HOT 2
- SITE IS DOWN :( HOT 2
- Invalid / confusing sysctl settings are suggested
- Change nofile ulimit instructions for Systemd HOT 2
- deletedvclock wrong in docs
- Example will not compile
- Riak TS Download shows AWS S3 Error HOT 6
- Where to find riak kv 1.4 documentation? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basho_docs.