gocql icon indicating copy to clipboard operation
gocql copied to clipboard

Need a load balancing policy that takes the server node's latency into account

Open Klose6 opened this issue 10 months ago • 4 comments

Hi, it looks the gocql driver has never include a load balancing policy that takes in the server node's latency into account, like the old LatencyAwarePolicy in the cassandra-java-driver 3.x, now in the latest cassandra-java-driver 4.x there is a separate LatencySensitiveLoadBalancingPolicy which adds the latency sensitivity in the client side based on the DefaultLoadBalancingPolicy, wondering is it ok for gocql to add the similar counterpart because this can add some smartness in the client to temporarily avoid the server node(s) with high latencies, thanks!

Klose6 avatar Apr 28 '25 05:04 Klose6

cc: @joao-r-reis

Klose6 avatar Apr 28 '25 05:04 Klose6

I'm neutral on this, if anyone wants to work on a PR I can take a look at it but it would probably benefit from a wider community discussion on the ASF slack (cassandra-drivers channel) or the Apache Cassandra dev mailing list

joao-r-reis avatar Apr 30 '25 15:04 joao-r-reis

Thank you for the reply! let me try to start a thread discussion(haven't done that before).

Klose6 avatar May 04 '25 18:05 Klose6

  1. We need to make sure that Timeouts are properly counted
  2. Does Cassandra suffer from LWT congestion when LWT queries for the same partition scheduled on different nodes ? If so, we need to figure out what to do with LWT queries in such case.
  3. We need to figure out how to properly marry it with DC/Rack and token aware policies

dkropachev avatar May 07 '25 20:05 dkropachev