Re: How to come up with a predefined topology

2012-07-16 Thread aaron morton
> Is the above understanding correct ? yes, sorry. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 13/07/2012, at 4:24 PM, prasenjit mukherjee wrote: > On Fri, Jul 13, 2012 at 4:04 AM, aaron morton wrote: >> The logic is here >> https://gi

Re: How to come up with a predefined topology

2012-07-12 Thread prasenjit mukherjee
On Fri, Jul 13, 2012 at 4:04 AM, aaron morton wrote: > The logic is here > https://github.com/apache/cassandra/blob/cassandra-1.1/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java#L78 Thanks Aaron for pointing to the code. > > a. n>r : I am assuming, have 1 replica in each rack.

Re: How to come up with a predefined topology

2012-07-12 Thread aaron morton
> WIll it also use the > snitch/strategy info to find next 'R' replicas 'closest' to > coordinator-node ? yes. > 2. In a single DC ( with n racks and r replicas ) what algorithm The logic is here https://github.com/apache/cassandra/blob/cassandra-1.1/src/java/org/apache/cassandra/locator/NetworkT

Re: How to come up with a predefined topology

2012-07-12 Thread prasenjit mukherjee
Thanks. Some follow up questions : 1. How do the reads use strategy/snitch information ? I am assuming the reads can go to any of the replicas. WIll it also use the snitch/strategy info to find next 'R' replicas 'closest' to coordinator-node ? 2. In a single DC ( with n racks and r replicas ) wh

Re: How to come up with a predefined topology

2012-07-11 Thread Tyler Hobbs
I highly recommend specifying the same rack for all nodes (using cassandra-topology.properties) unless you really have a good reason not too (and you probably don't). The way that replicas are chosen when multiple racks are in play can be fairly confusing and lead to a data imbalance if you don't

Re: How to come up with a predefined topology

2012-07-11 Thread prasenjit mukherjee
> As far as I know there isn't any way to use the rack name in the > strategy_options for a keyspace. You > might want to look at the code to dig into that, perhaps. Aha, I was wondering if I could do that as well ( specify rack options ) :) Thanks for the pointer, I will dig into the code. -Th

RE: How to come up with a predefined topology

2012-07-11 Thread Richard Lowe
Using PropertyFileSnitch you can fine tune the topology of the cluster. What you tell Cassandra about your "DC" and "rack" doesn't have to match how they are in real life. You can create virtual DCs for Cassandra and even treat each node as a separate rack. For example, in cassandra-topology.p