apache / apache/cassandra-gocql-driver

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

Open
#1,887 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.7k
Forks
658
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/apache/cassandra-java-driver/blob/3.x/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java) in the cassandra-java-driver 3.x, now in the latest cassandra-java-driver 4.x there is a separate [LatencySensitiveLoadBalancingPolicy](https://github.com/datastax/java-driver-policies/blob/main/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/LatencySensitiveLoadBalancingPolicy.java) which adds the latency sensitivity in the client side based on the [DefaultLoadBalancingPolicy](https://github.com/apache/cassandra-java-driver/blob/4.x/core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicy.java), 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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the referenced LatencyAwarePolicy, LatencySensitiveLoadBalancingPolicy, and DefaultLoadBalancingPolicy implementations first, then locate the GoCQL driver's existing load-balancing policy entry points. The issue names no GoCQL files or tests, so the policy behavior, scope, and validation needed for “done” must be agreed before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cassandra, go
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.