Skip to content

A load-balanced route, preparing for modern service infrastructure.

License

Notifications You must be signed in to change notification settings

AmethystDev-Labs/Krypton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Krypton

Krypton

高性能 HTTP 反向代理网关,支持健康检查、加权负载、重试策略与可脚本化行为。

build license release go

Docs (EN) · 中文文档 · Releases · Issues

简介

Krypton 是一个高性能 HTTP 反向代理网关,用于将请求分发到多个上游节点。 它包含健康检查、加权调度(SWRR)、失败降权、慢恢复与脚本扩展能力。 当启用 Admin API 后,可通过 /.krypton/ 进行管理操作。

特性

  • 加权负载均衡与分片锁,降低高并发下的锁竞争
  • 主动与被动健康检查融合,快速降级、渐进恢复
  • 重试策略可配置,支持超时与 5xx 重试
  • Starlark 脚本用于健康检查与触发逻辑
  • 可选 Admin API 用于运行期管理

快速开始

  1. 复制配置模板。
Copy-Item example.config.toml config.toml
  1. 修改 config.toml 中的 [[nodes]] 地址与权重。

  2. 启动服务。

go run .

安装

方式一:从 GitHub Releases 下载预编译二进制(包含预发布版本)。

方式二:源码构建。

Copy-Item example.config.toml config.toml
go build -o krypton.exe .

配置

  • 配置文件:config.toml
  • 模板文件:example.config.toml

更多配置说明请查看:

文档索引

English:

中文:

运行参数

  • KRYPTON_LOG_LEVEL=debug|info|warn|error

支持

贡献

  • 建议使用 gofmt 格式化代码。
  • 提交前运行 go vet ./...go test ./...

许可证

GPL-3.0。详见 LICENSE

项目状态

Pre-release 阶段,接口与行为可能会在稳定版前调整。

About

A load-balanced route, preparing for modern service infrastructure.

Resources

License

Stars

Watchers

Forks

Packages

No packages published