incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravikumar Govindarajan <ravikumar.govindara...@gmail.com>
Subject Re: Nodetool ring and multiple dc
Date Fri, 10 Feb 2012 07:51:24 GMT
Thanks David, for the clarification.

I feel it would be better if nodetool ring reports per-dc token space
ownerships to correctly reflect what cassandra is internally doing, instead
of global token space ownership.

- Ravi

On Fri, Feb 10, 2012 at 12:42 PM, David Schairer <dschairer@humbaba.net>wrote:

> nodetool ring is, IMHO, quite confusing in the case of multiple
> datacenters.  Might be easier to think of it as two rings:
>
> in your DC1 ring you have two nodes, and since the tokens are balanced,
> assuming your rows are randomly distributed you'll have half the data on
> each, since your replication factor in DC is 1.
>
> In your DC2 'ring' you have one node, and with a replication factor of 1
> in DC2, all data will go on that node.
>
> So you would expect to have n MB of data on XXX.YYY and XXX.ZZZ and 2n MB
> of data on AAA and BBB, and that's what you have, to a T.  :)
>
> In other words, the fact that you injecte node AAA.BBB with a token that
> seems to divide the ring into uneven portions, because the DC1 ring is only
> DC1, it's not left unbalanced by the new node. If you added a second node
> to DC2 you would want to give it a token of something like
> 106338239662793269832304564822427565952 so that the DC2 is also evenly
> balanced.
>
> --DRS
>
> On Feb 9, 2012, at 11:00 PM, Ravikumar Govindarajan wrote:
>
> > Hi,
> >
> > I was trying to setup a backup DC from existing DC.
> >
> > State of existing DC with SimpleStrategy & rep_factor=1.
> >
> > ./nodetool -h localhost ring
> > Address         DC          Rack        Status State   Load
>  Owns    Token
> >
> >
>        85070591730234615865843651857942052864
> > XXX.YYY        DC1         RAC1        Up     Normal  187.69 MB
> 50.00%  0
> > XXX.ZZZ       DC1         RAC1        Up     Normal  187.77 MB
> 50.00%  85070591730234615865843651857942052864
> >
> > After adding backup DC with NetworkTopologyStrategy {DC1:1,DC2:1}, the
> output is as follows
> >
> > ./nodetool -h localhost ring
> > Address         DC          Rack        Status State   Load
>  Owns    Token
> >
>        85070591730234615865843651857942052864
> > XXX.YYY    DC1         RAC1        Up     Normal  187.69 MB       50.00%
>  0
> > AAA.BBB    DC2         RAC1        Up     Normal  374.59 MB       11.99%
>  20392907958956928593056220689159358496
> > XXX.ZZZ    DC1         RAC1        Up     Normal  187.77 MB       38.01%
>  85070591730234615865843651857942052864
> >
> > As per our app rules, all writes will first go through DC1 and then find
> it's way to DC2. Since the "Owns" percentage has drastically changed, will
> it mean that the DC1 nodes will become unbalanced for future writes?
> >
> > We have a very balanced ring in our production with all nodes serving
> almost equal volume data as of now in DC1. Will setting up a backup DC2
> disturb the balance?
> >
> > Thanks and Regards,
> > Ravi
>
>

Mime
View raw message