valkey-io/iovalkey

Implement az-affinity-strategy

开放

#23 创建于 2025年1月13日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (27 个派生)github user discovery
good first issue

仓库指标

星标
 (234 个星标)
PR 合并指标
 (平均合并 10天 13小时) (30 天内合并 10 个 PR)

描述

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)

贡献者指南