Driver should be multi-datacenter safe by default

Description

The driver should use the DCAwareRoundRobin policy by default, and should use the datacenter of the seed node. Most people miss this, and end up crossing the DC when they shouldn't.

Environment

None

Pull Requests

None

Activity

Show:
Tyler Hobbs
March 26, 2014, 4:07 PM

I think that makes sense if all of the seed nodes are in the same datacenter. If not (and the user didn't explicitly set a local datacenter), perhaps it should warn the user?

Sylvain Lebresne
March 27, 2014, 3:01 PM

Agreed about changing the default, and using the datacenter of the first connected node is a good idea so committed that.

I don't entirely disagree that if all contact points are not in the same datacenter there could be some surprise, but it's actually really harder to check for that with how the code work, and I'd rather not break everything just to make that happen. Besides, the code I pushed advertise in the log at INFO what datacenter was picked, so hopefully their shouldn't be too much surprise here. It's likely better than the status quo as a default anyway.

I'll probably also add TokenAware by default: you want it more often than in practice (but that's a somewhat separate concern).

Assignee

Sylvain Lebresne

Reporter

MattM

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure