实现极限网关(INFINI Gateway)配置动态加载

还在停机更新 Gateway 配置,OUT 了。

今天和大家分享一个 Gateway 的功能:动态加载配置(也称热更新或热加载)。

这个功能可以在 Gateway 不停机的情况下更新配置并使之生效。

配置样例如下:

yaml 复制代码
path.data: data
path.logs: log

configs:
  auto_reload: true # set true to auto reload gateway configurations

entry:
  - name: my_es_entry
    enabled: true
    router: my_router
    max_concurrency: 200000
    network:
      binding: 0.0.0.0:8000

flow:
  - name: simple_flow
    filter:
      - http:
          schema: https
          host: 192.168.0.102:9200

router:
  - name: my_router
    default_flow: simple_flow

启动 Gateway,配置自动加载开启。

修改配置,如下:

yaml 复制代码
path.data: data
path.logs: log

configs:
  auto_reload: true # set true to auto reload gateway configurations

entry:
  - name: my_es_entry
    enabled: true
    router: my_router
    max_concurrency: 200000
    network:
      binding: 0.0.0.0:8000

flow:
  - name: simple_flow
    filter:
      - elasticsearch:
          elasticsearch: dev

router:
  - name: my_router
    default_flow: simple_flow

elasticsearch:
  - name: dev
    enabled: true
    endpoint: http://localhost:9200
    basic_auth:
      username: test
      password: testtest

从日志中可以看出修改后的配置文件已经加载。

关于极限网关(INFINI Gateway)

INFINI Gateway 是一个开源的面向搜索场景的高性能数据网关,所有请求都经过网关处理后再转发到后端的搜索业务集群。基于 INFINI Gateway,可以实现索引级别的限速限流、常见查询的缓存加速、查询请求的审计、查询结果的动态修改等等。

官网文档:docs.infinilabs.com/gateway/mai...

开源地址:github.com/infinilabs/...

相关推荐
熊文豪18 小时前
给国产数据库装上中文搜索引擎:zhparser vs jieba 分词实战,与三个隐藏关卡
数据库·搜索引擎·电科金仓
MartinYeung519 小时前
[论文学习]Unsafe LLM-Based Search: AI搜索引擎安全风险的定量分析与缓解
人工智能·学习·搜索引擎
远铂1 天前
BuildAdmin 智能建站系统全维度实测与选型指南
人工智能·搜索引擎·geo·buildadmin
IT新视界1 天前
Elasticsearch信创国产化替代
大数据·elasticsearch·搜索引擎
一次旅行2 天前
AI 前沿日报 | 2026年7月13日
人工智能·搜索引擎·百度
布局呆星2 天前
Git基础操作:从本地提交到远程仓库
大数据·elasticsearch·搜索引擎
爱学习的小可爱卢2 天前
Git全解析(2W+长文):从原理到高频操作手册
大数据·elasticsearch·搜索引擎
深海鱼在掘金2 天前
深入浅出RAG——第1章:认识RAG
人工智能·搜索引擎
我爱吃土豆13 天前
AI Agent 的工作原理:从大模型问答到自主执行任务
人工智能·搜索引擎·百度·agent
峥嵘life4 天前
Repo 常用操作手册
大数据·elasticsearch·搜索引擎