-
Notifications
You must be signed in to change notification settings - Fork 65
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
Core: add az awareness to read strategy #2539
Core: add az awareness to read strategy #2539
Conversation
ec034fe
to
9d5e64d
Compare
518c991
to
5edc891
Compare
0b3de2c
to
47691cf
Compare
8f419bc
to
a72f324
Compare
a72f324
to
c3e444e
Compare
Ok(value) => { | ||
let info_dict: InfoDict = FromRedisValue::from_redis_value(&value)?; | ||
if let Some(node_az) = info_dict.get::<String>("availability_zone") { | ||
con.set_az(Some(node_az)); |
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.
I would also add a debug message stating that the property "availability_zone" could not be found for this redis server
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.
@eifrah-aws I dont think its required - not having AZ is ok (redis/older versions)
glide-core/redis-rs/redis/src/cluster_async/connections_container.rs
Outdated
Show resolved
Hide resolved
); | ||
return connection; | ||
} | ||
} | ||
} | ||
|
||
fn get_connection(&self, readonly: bool) -> &ReconnectingConnection { | ||
async fn round_robin_read_from_replica_az_awareness( |
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.
I am worried that if we fix a bug in this method, we will also need to fix the one that is a copy - paste of this one above
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.
what is the bug?
Signed-off-by: Adar Ovadia <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
…han 7.1 version Signed-off-by: Adar Ovadia <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
c3e444e
to
3b34488
Compare
Signed-off-by: Adar Ovadia <[email protected]>
3b34488
to
2ab55f2
Compare
Signed-off-by: Adar Ovadia <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
Signed-off-by: Adar Ovadia <[email protected]>
e27985b
to
6d2e297
Compare
Issue link
This Pull Request is linked to issue (URL): #643
This PR adding support to AZ Affinity strategy for CME and CMD.
Only version Valkey-8.0 and above support AZ affinity strategy, since only from this version the info command supports the availability-zone property, which is required to support this feature.
In addition, as for now we added support only to the Async Client. Support for the Sync Client has been added to our backlog.
Checklist
Before submitting the PR make sure the following are checked: