Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Currently, this package contains two load balancing policies to be used with the
To use either of the policies, you need to include both the Java driver and this package as dependencies.
```xml
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
<version>4.10.0</version>
<version>4.18.0</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to make sure we've explicitly tested this LBP with this version of the Java driver before we recommend for users to use it. I'm perfectly fine with moving to a newer version of the driver than 4.10.0 as long as we've tested it to make sure there aren't any strange regressions from this version.

</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
Expand All @@ -16,6 +16,8 @@ To use either of the policies, you need to include both the Java driver and this
</dependency>
```

It is also compatible with older versions of the driver (version 4.10.0 and above), including the ones with `com.datastax.oss` group ID.

You also have to specify the name of the load balancing policy class in your `application.conf` (see [this](https://docs.datastax.com/en/developer/java-driver/4.17/manual/core/load_balancing/index.html#load-balancing)).
```conf
datastax-java-driver.basic.load-balancing-policy {
Expand All @@ -27,7 +29,7 @@ datastax-java-driver.basic.load-balancing-policy {
We recommend the `DefaultLoadBalancingPolicy` that comes with the Java Driver for general use.
This policy leverages real-time measurements and swiftly responds to changes in node status at short intervals, such as those caused by garbage collection or compaction—common factors that can slow down nodes.

However, if you anticipate prolonged delays in node responsiveness, such as during network upgrades or heavy data migrations, you might consider opting for the `LatencyAndInflightCountLoadBalancingPolicy` or `LatencySensitiveLoadBalancingPolicy`.
However, if you anticipate prolonged delays in node responsiveness, such as during network upgrades or heavy data migrations, you might consider opting for the `LatencyAndInflightCountLoadBalancingPolicy`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I see the point of just removing the policy from the README. The class files for the other LBP are not only in the JAR but also right next to the policy we're recommending.

Seems like the better answer is to be clearer about what the performance characteristics are with the two policies to allow users to make better informed choices about which to use.


`LatencySensitiveLoadBalancingPolicy` behaves the closest to the 3.x java driver's `TokenAwarePolicy(LatencyAwarePolicy(DCAwareRoundRobinPolicy))`.
They have an advantage over 4.x `DefaultLoadBalancingPolicy` when nodes are slowed for a long time, because they both depend on historical data.
Expand All @@ -46,4 +48,4 @@ Below is the client-side latency and the throughput of the 3.x driver, `LatencyA

We can see that the client-side latency for both `LatencyAndInflightCountLoadBalancingPolicy` and the 4.x `DefaultLoadBalancingPolicy` almost doesn't change while the 3.x driver's latency raises significantly.

We believe quick changes in node status are more common in production environments and therefore recommend either the 4.x `DefaultLoadBalancingPolicy` or `LatencyAndInflightCountLoadBalancingPolicy` for general use. You should consider `LatencySensitiveLoadBalancingPolicy` when you anticipate prolonged delays in node responsiveness.
We believe quick changes in node status are more common in production environments and therefore recommend either the 4.x `DefaultLoadBalancingPolicy` or `LatencyAndInflightCountLoadBalancingPolicy` to get busy node avoidance behaviour as described above.
Loading