Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EdgeProxy

A single-binary reverse proxy in Rust. The long-term goal is an MCP-aware gateway, but right now it's a plain HTTP/1 reverse proxy with the reliability bits you'd want in front of a real service.

Status: work in progress. The proxy path is done and reasonably tuned; TLS, caching, and the MCP layer are not here yet.

What works today

  • Prefix-based routing to multiple backends (longest prefix wins)
  • Load balancing: round-robin, least-connections, ip-hash
  • Per-replica circuit breaker with half-open probing
  • Retries on idempotent requests, capped by a retry budget
  • Per-backend timeouts (TTFB) and idle-stream timeouts
  • Edge limits: max body size, header count, connection cap, load shedding
  • Hop-by-hop header stripping, X-Forwarded-For handling
  • Prometheus metrics + structured tracing (OTLP export optional)
  • YAML config with ${VAR:-default} env substitution

Run

cargo run --release -- --config config.yaml

config.yaml is the default if --config is omitted. Validate without serving:

cargo run -- --config config.yaml --check-config

See config.yaml for a worked example. Metrics are at /metrics, health at /health.

Performance

Roughly 200k req/s on 4 cores (loopback, 1 KB bodies, keep-alive), added latency under 500us p50.

Not done yet

TLS termination, response caching, and the MCP gateway layer. The auth config block is half done for now.

About

A simple single-binary reverse proxy with production grade features for quick setup and a future MCP aware layer turning into a MCP gateway

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages