cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Prescod <>
Subject Re: Question about a potential configuration scenario
Date Fri, 23 Apr 2010 23:24:54 GMT


A Cassandra cluster always divides up the key space into ranges
delimited by Tokens as described above, but additional replica
placement is customizable via !IReplicaPlacementStrategy in the
configuration file. The standard strategies are

RackUnawareStrategy: replicas are always placed on the next (in
increasing Token order) N-1 nodes along the ring
RackAwareStrategy: replica 2 is is placed in the first node along the
ring the belongs in another data center than the first; the remaining
N-2 replicas, if any, are placed on the first nodes along the ring in
the same rack as the first
Note that with RackAwareStrategy, succeeding nodes along the ring
should alternate data centers to avoid hot spots. For instance, if you
have nodes A, B, C, and D in increasing Token order, and instead of
alternating you place A and B in DC1, and C and D in DC2, then nodes C
and A will have disproportionately more data on them because they will
be the replica destination for every Token range in the other data

The corollary to this is, if you want to start with a single DC and
add another later, when you add the second DC you should add as many
nodes as you have in the first rather than adding a node or two at a
time gradually.

On Fri, Apr 23, 2010 at 4:17 PM, banks <> wrote:
> just make them one cluster, and use the rackAware logic...
> On Fri, Apr 23, 2010 at 7:21 AM, Campbell, Joseph
> <> wrote:
>> Question:
>>        It is possible to setup Cassandra such that 2 independent
>> Cassandra rings/clusters replicate to one another, ensuring that each
>> ring/cluster has at least 1 copy of all the data on each ring/cluster?
>> The setup is like this:
>>        2 Data centers, one in Philadelphia and another in Denver.  In
>> each data center there exists a Cassandra ring/cluster.  Each data
>> center is being used as a live-live origin (meaning both data centers
>> are in use at any point in time).  I would like to be able to guarantee
>> that in the event that one or the other of the data centers goes down
>> that 'ALL' the available data in that failed data center is also
>> available in the other data center such that traffic to the origin
>> website that depends on the data can simply be switched over to the
>> other site (Using Akamai, or other tools).  Is this type of
>> configuration possible/available in Cassandra?  If so how would you set
>> it up, and what might some of the draw backs be?
>> Thanks,
>>        Joe Campbell
>> --
>> Anyone can get hit by a MOVING car,
>> but it takes skill to get hit by a PARKED car.
>>                     -- Random Tee-shirt on Dysfunction
>> Joe Campbell | one comcast center | philadelphia, pa 19103 |
>> 215.286.5073

View raw message