百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

kage

> 编程语言
开源

Kage (kah-geh) 是一个阴影代理服务器,用于双工 HTTP 请求

504 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

Kage (kah-geh) 是一个阴影代理服务器,用于双工 HTTP 请求

Kage

Kage (kah-geh) is an HTTP shadow proxy server that sits between clients and your server(s) to enable "shadow requests".

Kage can be used to duplex requests to the master (production) server and shadow servers that have newer code changes that are going to be deployed. By shadowing requests to the new code you can make sure there are no big/surprising changes in the response in terms of data, performance and database loads etc.

Kage is built with EventMachine and em-proxy and all shadow requests are done asynchronously, while responses from master are sent back to the client without blocking the network, so clients will never notice any delays even when shadow traffic is made.

You can customize the behavior of Kage with simple callbacks, when it chooses which backends to send shadow requests to (or not at all), appends or deletes HTTP headers per backend, and examines the complete HTTP response (including headers and body).

Features

  • Support HTTP/1.0 and HTTP/1.1 with partial keep-alive support (See below)
  • Callback to decide backends per request URLs
  • Callback to manipulate request headers per request and backend
  • Callback to examine responses from multiple backends (e.g. calcurate diffs)

Kage does not yet support:

  • SSL
  • HTTP/1.1 requests pipelining

Usage

…

Read more sample code under the examples/ directory.

Keep-alives

Kage supports keep-alives for single backend requests, i.e. for requests where on_select_backends returns only the master backend.

To make on_backend_finished callback simpler, if the current request matches with multiple backends, Kage sends Connection: close to the backends so that the callback will only get one response per backend in responses hash, which would look like:

ruby
responses = {
  :original => {:data => "(RAW HTTP response)", :elapsed => 0.1234},
  :sandbox  => {:data => "(RAW HTTP response)", :elapsed => 0.2333},
}

Authors

Tatsuhiko Miyagawa, Yusuke Mito

Acknowledgements

Ilya Grigorik, Jos Boumans

Based On

  • EventMachine
  • em-proxy
  • http_parser.rb

Issues· 3 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言