nic-6443 commented on code in PR #13532:
URL: https://github.com/apache/apisix/pull/13532#discussion_r3395427682
##########
apisix/balancer.lua:
##########
@@ -229,7 +280,12 @@ local function pick_server(route, ctx)
end
end
- if checker then
+ local health_status
+ if checker and up_conf.type == "chash" then
+ health_status = fetch_health_status(up_conf, checker)
+ end
Review Comment:
Done in 2543465. `balancer.lua` now caches chash health snapshots by
upstream key/version and `checker.status_ver`, so the ring stays config-driven
while the node status scan only reruns when health state changes.
##########
apisix/plugins/ai-proxy-multi.lua:
##########
@@ -448,8 +514,13 @@ local function pick_target(ctx, conf, ups_tab)
end
end
- local version = plugin.conf_version(conf) .. "#" ..
- get_checkers_status_ver(conf, checkers)
+ local health_status
+ local version = plugin.conf_version(conf)
+ if conf.balancer.algorithm == "chash" then
+ health_status = fetch_health_status(conf, checkers)
+ else
+ version = version .. "#" .. get_checkers_status_ver(conf, checkers)
+ end
Review Comment:
Done in 2543465. `ai-proxy-multi` now caches chash health snapshots by
plugin version, checker status versions, and DNS node versions, then reapplies
the cached healthy DNS nodes before selecting the request target.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]