ai-load-balancer插件不太好用 || ai-load-balancer plug-in is not easy to use
#3,407 opened on Jan 29, 2026
Repository metrics
- Stars
- (8,582 stars)
- PR merge metrics
- (PR metrics pending)
Description
Higress版本
使用2.1.5Higress,拉取主分支代码ai-load-balancer在本地打包wasm
基于redis的最小请求
看代码只能处理瞬时的负载均衡,一段时间内持续请求就退化为随机数了,长时间请求负载均衡效果非常差,还不如默认的轮询好用。 底层代码类似加锁,可以考虑加个滑动窗口的?
检测模型可用
https://higress.ai/blog/higress-gvr7dx_awbbpb_qg6l3tk0zc4dughn#%E5%89%8D%E7%BC%80%E5%8C%B9%E9%85%8D%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-1 技术文章写了:在全局最小请求数负载均衡中我们重点关注了请求异常(例如后端服务不可访问、客户端断连、服务端断连等)情况下的处理,通过在HttpStreamDone阶段统一进行计数的变更可以保证异常中断的请求也能够得到计数的更新,避免因请求异常导致服务计数异常情况。 但是实测kill掉一个模型pod,后续请求会持续报错。 这个问题我们配上pod健康检测就解决了,持续请求只看到一个请求超时
基于cluster
测试用不了,插件成功修改cluster,但是envoy处理时错误,看日志route_not_found. 禁用插件就可用正常访问
Higress version
Using 2.1.5Higress, pull the main branch code ai-load-balancer and package wasm locally
Minimum request based on redis
Looking at the code, it can only handle instantaneous load balancing. Continuous requests within a period of time will degrade into random numbers. The load balancing effect of long-term requests is very poor, and it is not as useful as the default polling. The underlying code is similar to locking. Can you consider adding a sliding window?
Detection model is available
https://higress.ai/blog/higress-gvr7dx_awbbpb_qg6l3tk0zc4dughn#%E5%89%8D%E7%BC%80%E5%8C%B9%E9%85%8D%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1-1 The technical article writes: In the global minimum number of requests load balancing, we focus on the processing of request exceptions (such as back-end service inaccessibility, client disconnection, server disconnection, etc.). By uniformly changing the count in the HttpStreamDone stage, we can ensure that abnormally interrupted requests can also get the count update, avoiding service count exceptions caused by request exceptions. However, in actual testing, if a model pod is killed, subsequent requests will continue to report errors. We solved this problem by adding pod health detection. For continuous requests, we only see one request timeout.
Based on cluster
The test does not work. The plug-in successfully modified the cluster, but an error occurred during envoy processing. See the log route_not_found. Disable plug-ins for normal access