Core: add az awareness to read strategy#2539
Merged
adarovadya merged 10 commits intovalkey-io:release-1.2from Nov 18, 2024
Merged
Core: add az awareness to read strategy#2539adarovadya merged 10 commits intovalkey-io:release-1.2from
adarovadya merged 10 commits intovalkey-io:release-1.2from
Conversation
Closed
ec034fe to
9d5e64d
Compare
518c991 to
5edc891
Compare
eifrah-aws
requested changes
Nov 7, 2024
0b3de2c to
47691cf
Compare
avifenesh
reviewed
Nov 14, 2024
avifenesh
reviewed
Nov 14, 2024
8f419bc to
a72f324
Compare
a72f324 to
c3e444e
Compare
eifrah-aws
requested changes
Nov 14, 2024
| 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)); |
Contributor
There was a problem hiding this comment.
I would also add a debug message stating that the property "availability_zone" could not be found for this redis server
Collaborator
There was a problem hiding this comment.
@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
| } | ||
|
|
||
| fn get_connection(&self, readonly: bool) -> &ReconnectingConnection { | ||
| async fn round_robin_read_from_replica_az_awareness( |
Contributor
There was a problem hiding this comment.
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
Collaborator
Author
There was a problem hiding this comment.
what is the bug?
added 6 commits
November 16, 2024 20:05
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
…han 7.1 version Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
c3e444e to
3b34488
Compare
Signed-off-by: Adar Ovadia <adarov@amazon.com>
3b34488 to
2ab55f2
Compare
ikolomi
requested changes
Nov 17, 2024
added 2 commits
November 17, 2024 11:59
Signed-off-by: Adar Ovadia <adarov@amazon.com>
Signed-off-by: Adar Ovadia <adarov@amazon.com>
eifrah-aws
reviewed
Nov 18, 2024
Signed-off-by: Adar Ovadia <adarov@amazon.com>
e27985b to
6d2e297
Compare
eifrah-aws
approved these changes
Nov 18, 2024
ikolomi
approved these changes
Nov 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: