Replies: 2 comments 6 replies
-
I guess it should be the first one since a server’s stats can't provide client latencies.
That is the only way to obtain the availability zone right now. However, it seems overkill to me. I think we should propose letting the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Adding AZ description to
ReplicaInfo
. We cover [valkey client spec](https://github.com/valkey-io/valkey-doc/pull/164/files/538267853f1de1265c28b9a1790aa95e133f15b5#diff-2bfc9a970925d3653728ad770a3ff03d65be3b8e4edf70835f849b4a60d80f5f)Design
Adding
AZ
method towire
.Also adding
az
field topipe
.AZ
method returns connected valkey server’s availability zone.We already send
HELLO
command in_newPipe
constructor if using RESP3 protocol. Unless user don’t want to use RESP3 protocol or Redis version is lower than 6, we can get availability_zone fromHELLO
command if Valkey server supportsavailability_zone
.Unless Redis version is lower than 6, we send
HELLO
command always using RESP2 protocol. UnlessnoHello
error message is matched, we can parse “availability_zone” and “version” fromHELLO
command response.After parsing
availability_zone
value, we store asaz
field value.Because we can’t directly access to
wire
inclusterClient
. we addAZ
method toconn
likeVersion
orInfo
methods.AZ
method is just proxy to callAZ
method inwire
Adding AZ to
ReplicaInfo
In
_refresh
method, we should two things.conn
is constructed, we callAZ()
to get server’s availability zone.ReplicaInfo
ingroup
Beta Was this translation helpful? Give feedback.
All reactions