Hi Donald, which driver are you using? With the datastax python driver you need
to use the DCAwareRoundRobinPolicy for the load balancing policy if you want the
driver to distinguish between your data centres, otherwise by default it round
robins robins requests amongst all nodes regardless of which data centre they
are in, and regardless of which data centre the nodes you told it to connect to
are in. Probably it is the same for the other datastax drivers.
Best wishes, Duncan.
On 30/01/14 02:07, Donald Smith wrote:
We have two datacenters, DC1 and DC2 in our test cluster. Our *write* process
uses a connection string with just the two hosts in DC1. Our *read* process uses
a connection string just with the two hosts in DC2. We use a
PropertyFileSnitch and a property file that ‘DC1’:2, ‘DC2’:1 between data
centers.
I notice from the *read* process’s logs that the reader adds ALL the hosts (in
both datacenters) to the list of queried hosts.
My question: will the *read* process try to read first locally from the
datacenter DC2 I specified in its connection string? I presume so. (I doubt
that it uses the client’s IP address to decide which datacenter is closer. And I
am unaware of another way to tell it to read locally.)
Also, will read repair happen between datacenters automatically
(“read_repair_chance=0.100000”)? Or does that only happen within a single data
center?
We’re using Cassandra 2.0.4 and CQL.
Thank you
*Donald A. Smith*| Senior Software Engineer
P: 425.201.3900 x 3866
C: (206) 819-5965
F: (646) 443-2333
dona...@audiencescience.com <mailto:dona...@audiencescience.com>
AudienceScience