Skip to content

优化redis client,支持在识别到 NOAUTH 响应的时候,重新初始化 #2000

Open
@Lewisyixin

Description

@Lewisyixin
  • bug概述

修改McpBridge后会导致token限流插件的redis认证为空

  • 复现步骤
  1. 配置了外部服务类型的redis服务
k -nhigress-system get mcpbridges.networking.higress.io -oyaml
apiVersion: networking.higress.io/v1
kind: McpBridge
metadata:
  creationTimestamp: "2025-03-31T15:58:21Z"
  generation: 29
  name: default
  namespace: higress-system
  resourceVersion: "243407"
  uid: a3071821-737e-4214-97e6-6211580e928b
spec:
  registries:
  - domain: 10.56.23.202:6379
    name: redis-out
    port: 6379
    protocol: http
    type: static
  1. 配置好ai-token-ratelimit插件(此过程略,按照官网文档配置就行)
    此时限流插件是能正常运行的,并且每次发送请求,能看到higress->redis的数据包是有auth命令的
    Image
  2. 修改步骤1中(即McpBridge配置)的port配置,例如从6379改到80,再改回6379(有此类操作的原因是因为默认从dashboard上配置,只支持http协议,redis配置出来之后是80端口,所以需要手动修改一下,才发现的问题)
    此时再去发送客户端请求,会发现higress->redis包命令已经不带auth参数了,并且网关也会报相关错误

Image

Image
4. 但是将ai-token-ratelimit插件关闭再打开后恢复正常

想确认下这个算不算bug

Ⅵ. Environment:

  • Higress version: higress-2.0.7
  • OS : centos7的k8s集群中,k8s 版本 v1.29.15
  • Others:

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions