cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "VirtualNodes/Balance" by EricEvans
Date Thu, 26 Jul 2012 22:39:42 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "VirtualNodes/Balance" page has been changed by EricEvans:
http://wiki.apache.org/cassandra/VirtualNodes/Balance?action=diff&rev1=4&rev2=5

  <<Anchor(implementation)>>
  == Implementation (Draft) ==
  === Considerations ===
- In the most basic sense, ''balanced'' means that each node has 1/n of the token-space, so
adjusting ownership for [[#heterogeneous_nodes|heterogeneous nodes]] is implicitly about ''unbalancing''.
 This is important because, if for example, you reduced ownership of a node to say (1/n)*.8,
you expect that imbalance to persist, and not be balanced-away by operations on other nodes.
+  * In the most basic sense, ''balanced'' means that each node has 1/n of the token-space,
so adjusting ownership for [[#heterogeneous_nodes|heterogeneous nodes]] is implicitly about
''unbalancing''.  This is important because, if for example, you reduced ownership of a node
to say (1/n)*.8, you expect that imbalance to persist, and not be balanced-away by operations
on other nodes.
  
- ''Note: This will likely require storing state, in the form of an offset, on each node.''
+  * "Shuffling node at a time means that for each node i for i in 0..N-1 (where N is the
cluster size), i/N of the ranges shuffled will, on average, have been shuffled at least once
already. So it's substantially less efficient than shuffling once, then assigning the vnodes
out in one cluster-wide pass." -- ''Jonathan Ellis''<<FootNote([[https://issues.apache.org/jira/browse/CASSANDRA-4443?focusedCommentId=13423505&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13423505|CASSANDRA-4443#comment-13423505]])>>
  
  === Nodes / Cluster ===
  The most straightforward method of effecting ownership is a token move (i.e. relocating
a range from one node to another).  Exposing this with JMX would allow implementing all of
the required operations client-side.
  
  === User Interface ===
  
- The `balance` sub-command "balances" the node it is ran against, by default a targeted ownership
of `1/n`.  The sub-command takes an optional offset in the range<<FootNote(Does this
range make sense?)>> of `+100` to `-100`, which results in a targeted ownership of `(1/n)*(offset/100)`.
+ TODO
  
- ''Note: ranges copied from/to other nodes must be selected in such a way as to respect their
offsets.''
- 
- {{{
- $ nodetool balance [+/-offset]
- }}}
- 
- The ``shuffle` sub-command randomly exchanges contiguous ranges on the node it ran against,
with other nodes in the cluster.
- 
- {{{
- $ nodetool shuffle
- }}}
- 
- The `trim` sub-command assigns an offset in the range<<FootNote(Does this range make
sense?)>> of `+100` to `-100`, and copies randomly selected ranges onto, or off of,
the node it is ran against to achieve the requested ownership (`(1/n)*(offset/100)`).
- 
- {{{
- $ nodetool trim <+/- offset>
- }}}
- 

Mime
View raw message