Open piodul opened 2 years ago
@avelanarius - need to get higher priority (than medium) to complete the gap on topology awareness
@avelanarius - need to get higher priority (than medium) to complete the gap on topology awareness
@avelanarius - ping - let's ensure this get a priority - I see it may have missed 1.0.0?
@avelanarius , @roydahan - ping - what's the latest here?
With the current plan it will miss 1.0.0. If it's important enough (why? can you please give a background?), we can reconsider the plan or have it as part of 1.0.x.
With the current plan it will miss 1.0.0. If it's important enough (why? can you please give a background?), we can reconsider the plan or have it as part of 1.0.x.
Cost, but more importantly, it confuses customers when they see those connections.
IIUC, such heuristics (suggested by @piodul above) would be satisfactory:
WDYT? @Lorak-mmk @avelanarius @mykaul
After discussion with @Lorak-mmk, the conclusion is that the above heuristics is a reasonable default, but we have to provide a way to override the DC preferred for control connections with a user-provided one. For that, a SessionConfig
's parameter should be added.
Yet another observation:
The notion of "the local DC" and "the local rack" are constant for the driver instance; i.e., we could enable the user to set it only once, upon Session
construction. Then, there would be configurable options for:
This way the user won't have to provide the preferred DC and rack separately for control connections and for LBP.
Currently, if the node which handled the control connection goes down, the driver will walk over the list of remaining nodes, in random order, sequentially trying to re-restablish the control connection until it manages to do it. However, this the random order does not consider DCs at all. While the latency of requests on control connection isn't too important, it would be nice if the schema/topology information didn't have to involve cross-DC traffic.
While we don't have a concept of a local DC in the Session (yet?), we can approximate it by assuming that the contact nodes are from the local DC. After establishing the first control connection, we should always prefer nodes from the DC of the first node.