-
Notifications
You must be signed in to change notification settings - Fork 38
4.x: Add rack awareness to default load balancing policy #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
64dc1e0
to
1fa74d2
Compare
Any updates? |
c632982
to
27da24b
Compare
@avelanarius Ping. |
...ain/java/com/datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicy.java
Outdated
Show resolved
Hide resolved
.../main/java/com/datastax/oss/driver/internal/core/loadbalancing/BasicLoadBalancingPolicy.java
Show resolved
Hide resolved
...rc/main/java/com/datastax/oss/driver/internal/core/loadbalancing/helper/LocalRackHelper.java
Show resolved
Hide resolved
...java/com/datastax/oss/driver/internal/core/loadbalancing/helper/OptionalLocalRackHelper.java
Outdated
Show resolved
Hide resolved
...ain/java/com/datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicy.java
Outdated
Show resolved
Hide resolved
I think that the tests part should be extended a bit to include more cases. |
Hello team, Are we going to release it in the next 3 days? |
...datastax/oss/driver/internal/core/loadbalancing/DefaultLoadBalancingPolicyQueryPlanTest.java
Show resolved
Hide resolved
0686d57
to
1a428dd
Compare
The default load balancing policy will prefer replicas that are in the local datacenter and in the local rack. The rack awareness feature is optional, to enable it a local rack should be supplied through configuration by defining the option `DefaultDriverOption.LOAD_BALANCING_LOCAL_RACK` `basic.load-balancing-policy.local-rack`, otherwise it will be disabled and unlike the local datacenter it will not be implicitly fetched from the provided contact points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I also did some additional manual testing with 12-node, 3 datacenter, 6 rack cluster and it all worked correctly.
@ricardoborenstein Although we have some tests in this PR and I did manual testing, we'll try to do some more testing in the coming 3 days before the release. |
@avelanarius when you have the time, can you please share the results of the tests and/or how you tell if it works or not. |
|
@ricardoborenstein ^ |
@avelanarius is anyone taking it to cassandra-stress ? (or the equivalent 3.x version ?) |
The default load balancing policy will prefer replicas that are in the local datacenter and in the local rack.
The rack awareness feature is optional, to enable it a local rack should be supplied through configuration by defining the option
DefaultDriverOption.LOAD_BALANCING_LOCAL_RACK
basic.load-balancing-policy.local-rack
, otherwise it will be disabled and unlike the local datacenter it will not be implicitly fetched from the provided contact points.