valkey-io/iovalkey

Implement az-affinity-strategy

オープン

#23 opened on 2025/01/13

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (27 件のフォーク)github user discovery
good first issue

Repository metrics

Stars
 (234 個のスター)
PR merge metrics
 (平均マージ 10d 13h) (30d で 10 merged PRs)

説明

By implementing AZ affinity routing in valkeyio, we can achieve lower latency and cost savings by routing requests to replicas in the same availability zone as the client. This is available in Valkey 8.

https://valkey.io/blog/az-affinity-strategy/

Some additional notes:

  • How does it know which replicas are the closest?

Generally speaking it is a free text. You can think of it as route based on replica name. For example, the user can configure the name "This replica likes Shakshouka" and route the client only to replicas that has this text. The user has to configure the names at the server side and the client side. For managed service the name may be auto configured by the server. But, as client maintainer you should not care about that in your implementation. (from this discussion)

コントリビューターガイド