Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 1

A high-performance, concurrent, dual-engine (L4/L7) reverse proxy and load balancer engineered in Rust.

Iron-Proxy is designed for modern enterprise infrastructure, featuring mathematical latency-aware routing, automatic request resilience, and zero-downtime operations. Built on top of tokio and hyper, it safely multiplexes raw TCP streams alongside HTTP traffic without blocking the main event loop.

✨ Enterprise Features

  • Dual-Engine Multiplexing: Run raw Layer 4 (TCP) and Layer 7 (HTTP) proxies side-by-side from a single binary.
  • Advanced Load Balancing: Lock-free, highly concurrent routing using Peak EWMA (Exponentially Weighted Moving Average) for HTTP, Least Connections for TCP, and IP Hashing for stateful Sticky Sessions.
  • Zero-Downtime Hot Reloading: Modify your iron-proxy.toml on the fly. The proxy watches for file system events and safely swaps configuration states without dropping active client connections.
  • Self-Healing Resilience: Features asynchronous background health checks and automatic L7 request retries with in-memory body buffering for 5xx backend errors.
  • First-Class Observability: Native Prometheus /metrics endpoint and strict, structured JSON telemetry for seamless Datadog/Grafana integration.
  • Unix Daemonization: Production-ready CLI with native background process management.

⚙️ Architecture & Internals

Iron-Proxy is architected for maximum throughput and minimal tail latency.


🔒 Lock-Free State Management

The internal ConnectionTracker uses:

  • DashMap for concurrent shared state
  • Raw 64-bit atomic floating-point math via AtomicU64 bit-casting

This enables latency metrics to be updated in sub-microsecond time without traditional Mutex thread locking.

Atomic updates → zero lock contention → lower tail latency

💻 Command Line Interface

CommandDescription
initGenerates a standard iron-proxy.toml template
startForks the process and runs the proxy in daemon mode
stopGracefully stops the daemon via SIGTERM
statusQueries the Admin API for real-time backend health
checkValidates TOML syntax without opening ports
runRuns the proxy in the foreground (Docker/systemd friendly)

🚀 Quick Start

Installation

Pre-compiled binaries for Linux, macOS (Apple Silicon/Intel), and Windows are available.

  1. Download the latest binary from the Releases tab.
  2. Extract the executable and add it to your system $PATH.

(Alternatively, build from source: cargo install --path .)

Running the Proxy

Generate the default configuration file in your current directory:

iron-proxy init

Start the proxy in the background (Daemon mode):

iron-proxy start

Check the real-time cluster status:

iron-proxy status