Everything You Need at the Edge
One Rust binary for API management at scale: every protocol, eight operating modes, 81 built-in plugins, a Kubernetes-native service mesh, AI and agent governance, and the security, resilience, and observability large platforms depend on.
Full Protocol Stack
HTTP/1.1
Keep-alive connection pooling, chunked transfer encoding, full request/response lifecycle plugin support.
HTTP/2
ALPN negotiation with multiplexed direct-H2 backend pools, flow-control tuning, and in-path body-size enforcement.
HTTP/3 (QUIC)
Enable it and HTTP/3 is served on the HTTPS port number with streaming responses, backend H3 capability detection, per-backend QUIC pooling, and opt-in CONNECT-UDP (RFC 9298).
WebSocket
Upgrade over HTTP/1.1, Extended CONNECT over HTTP/2 and HTTP/3. One plugin pipeline across all three frontends, with frame inspection, rate limiting, Origin validation, and opt-in permessage-deflate.
gRPC & gRPC-Web
Runtime-detected gRPC with trailer support on h2c and TLS. Bidirectional gRPC-Web translation for browser clients, method routing, and deadline enforcement.
TCP
Raw stream proxying with TLS termination, origination, or SNI-aware passthrough. Outbound PROXY protocol v2, connection throttling, adaptive buffers, and zero-copy splice(2) on Linux.
UDP / DTLS
Datagram proxying with session tracking, DTLS 1.2/1.3 termination and origination, amplification protection, and jitter-aware buffering.
SSE Streaming
First-class Server-Sent Events handling with correct streaming headers, Last-Event-ID forwarding, and optional event wrapping — essential for LLM traffic.
Eight Modes, One Binary
Set FERRUM_MODE and the same binary becomes whatever your architecture needs.
File Mode
Single instance driven by a YAML/JSON config with SIGHUP hot reload. Ideal for development, single-node deployments, and GitOps workflows. No external dependencies.
Database Mode
Proxies, consumers, plugins, and upstreams stored in PostgreSQL, MySQL, SQLite, or MongoDB. Full Admin API for zero-downtime runtime changes, with failover URLs and read replicas. Config cached in memory for resilience against database outages.
Control Plane (CP)
Centralized configuration authority. Reads from the database and pushes config to Data Planes over TLS-first gRPC streams with JWT authentication. One CP can serve many namespaces, with a JWT tenancy claim isolating each team.
Data Plane (DP)
Horizontally scalable traffic processors. Priority-ordered multi-CP failover, bounded last-known-good config, and automatic reconnection. Add instances without touching the Control Plane.
Mesh Mode
Service-mesh data plane with six topologies: sidecar, ambient, experimental node waypoint, service waypoint, east-west gateway, and egress gateway. Consumes native MeshSubscribe, standard xDS ADS, or a local mesh config file.
Injector Mode
Kubernetes admission webhook that injects Ferrum mesh sidecars and init capture containers into opted-in workloads, deriving SPIFFE IDs from pod service accounts. Supports iptables and eBPF capture.
Node Agent Mode
Per-node eBPF capture manager for the ambient mesh. Programs socket-cookie and original-destination eBPF maps and per-pod identity enrollment, with an optional CNI plugin — no proxy listeners at all.
Migrate Mode
Runs database schema migrations, reports migration status, or rewrites config files to the current schema — then exits. Built for CI/CD pipelines and Kubernetes Jobs.
A Full Mesh Data Plane
The sidecar mesh with native config and SPIRE identity, and cross-cluster east-west federation, are on the GA track, enforced by live, release-blocking conformance suites.
Six Topologies
Sidecar, ambient (HBONE), service waypoint (GAMMA), east-west gateway, egress gateway, and experimental sidecarless node waypoint — mix and match per workload.
SPIFFE & SPIRE Identity
Workload identity from mTLS peer certificates and HBONE baggage. SPIRE Agent integration is the production identity path, with automatic SVID rotation and federated trust bundles; a built-in Workload API serves X.509 and JWT-SVIDs for dev and lab meshes.
Mesh Authorization
Identity-based policies with mesh-wide, namespace, and workload scopes. DENY-first evaluation with Istio-compatible semantics, plus strict, permissive, or disabled mTLS per workload and port.
Istio Resource Translation
VirtualService, DestinationRule, AuthorizationPolicy, RequestAuthentication, PeerAuthentication, ServiceEntry, WorkloadEntry, Sidecar, Telemetry, and ProxyConfig — run Istio-style policy on a Rust data plane.
Ambient & eBPF Capture
HBONE ambient mode with eBPF capture managed by the node agent (published -ebpf images, Linux kernel 5.7+ with cgroup v2), with an iptables fallback.
Transparent DNS Proxy
Resolves mesh ServiceEntry hosts and service names to workload IPs; forwards everything else upstream. Wildcard host support.
Registry-Only Egress
REGISTRY_ONLY outbound policy rejects destinations outside known services and ServiceEntries — controlled egress by default.
Multi-Cluster Federation
East-west gateways with SNI-routed passthrough, SPIRE trust-bundle federation, and cross-cluster SPIFFE validation, proven by a live two-cluster suite. Cross-cluster endpoint discovery adds local-first failover.
Mesh Observability
Istio/GAMMA-compatible RED metrics with workload labels, per-scope trace sampling, access log filtering via the Telemetry API, and config-drift introspection.
Native to Your Clusters
A built-in Kubernetes controller translates Gateway API and Istio resources into Ferrum configuration and reports status back on the resources it owns.
Gateway API Conformance
The upstream Gateway API v1.5.1 conformance suite runs the GATEWAY-HTTP and GATEWAY-GRPC profiles as a required check on every relevant change.
Every Route Kind
GatewayClass, Gateway, ListenerSet, HTTPRoute, GRPCRoute, TCPRoute, TLSRoute, and UDPRoute, with ReferenceGrant, BackendTLSPolicy, and multi-cluster ServiceImport backends.
Multi-Certificate HTTPS
Gateway listeners serve every authorized certificate from one SNI-aware resolver, with conflict detection and fail-closed admission.
cert-manager Integration
Read TLS material straight from Kubernetes Secrets with k8s:// sources; rotations apply live, with no remount or restart.
Helm Charts
ferrum-gateway and ferrum-mesh charts. The gateway chart ships Prometheus alerts and Grafana dashboards, and every alert links a runbook.
Sidecar Injection
An admission webhook injects mesh sidecars and capture init containers into opted-in workloads, deriving SPIFFE IDs from service accounts.
Govern Every Token
Fourteen purpose-built plugins covering routing, cost, safety, compliance, and agent traffic.
Provider Federation & Streaming
Buffered routing to 11 providers — OpenAI, Anthropic, Google Gemini/Vertex, Azure OpenAI, AWS Bedrock, Mistral, Cohere, xAI, DeepSeek, Meta Llama, Hugging Face — with model mapping, priority fallback, and per-provider circuit breakers. Federation streaming is opt-in for supported OpenAI-compatible providers. Use ai_stream_router to normalize Anthropic and Gemini streams; streaming support varies by provider.
Cost Control
Token-aware rate limiting with pre-request reservation and Redis-coordinated budgets across instances. Token metrics extraction for every major provider format. Semantic caching returns cached answers for similar prompts. Prompt compression trims token spend without external models.
Safety & Guardrails
Semantic firewall for prompt injection, jailbreaks, and data-exfiltration intent. Prompt shield detects and redacts PII before it reaches providers. Response guard validates output content and format. Request guard enforces model allowlists, token limits, and parameter policy.
Agents & Compliance
Tool governor applies deterministic allow/deny/redact/approval policy to AI tool calls — including streaming. MCP gateway aggregates Model Context Protocol tool servers behind one endpoint and can publish your REST APIs as MCP tools from their OpenAPI specs; A2A gateway governs Agent-to-Agent traffic. Transcript audit captures redacted, hashed records for compliance export.
Intelligent Traffic Distribution
Seven Algorithms
Round robin, weighted round robin, least connections, least latency, consistent hashing (IP/header/cookie sticky sessions), random, and mesh original-destination passthrough.
Active Health Checks
HTTP, TCP connect, UDP, and gRPC grpc.health.v1 probes with configurable intervals and thresholds. Unhealthy targets leave the rotation automatically.
Passive Health & Circuit Breaking
Live traffic triggers failover without probe connections, and Closed / Open / Half-Open circuit breakers stop cascading failures and probe recovery automatically.
Overload Manager
Watches file descriptors, connections, in-flight requests, and event-loop latency, then sheds load progressively — RED-style keep-alive shedding first, then refusing new connections and requests.
Retries with Backoff
Connection- and HTTP-level retries with fixed or exponential backoff across HTTP/1.1, HTTP/2, HTTP/3, gRPC, and WebSocket.
Adaptive Concurrency
Target-aware backend admission shrinks in-flight limits when latency or failure signals rise — protecting backends before they fall over.
Config Survives Outages
In-memory config cache keeps traffic flowing through database, file, or control-plane outages, with startup failover from a backup config file.
Multi-URL Failover
Ordered database failover URLs, read-replica support, DP multi-CP failover, and multi-region HA via shared database clusters.
Graceful Shutdown
SIGTERM drains in-flight requests before exit. Client observability headers expose gateway and upstream error causes.
Defense in Depth
WAF
Content-pattern threat detection: SQLi, NoSQLi, XSS, command/template injection, Log4Shell, path traversal, SSRF, XXE, deserialization, and response data leaks — with paranoia levels, monitor/enforce posture, WebSocket message inspection, and optional raw TCP/UDP inspection.
10 Authentication Methods
mTLS, OAuth2 introspection, OIDC relying party, JWT, JWKS with DPoP, API key, Basic, HMAC with single-use replay protection, LDAP / Active Directory, and SOAP WS-Security with SAML — combine them per route.
OIDC Single Sign-On
Gateway-managed browser login: authorization code with PKCE, ID token validation, encrypted session cookies, optional UserInfo enrichment, and logout.
OPA Policy
Open Policy Agent authorization with fail-closed defaults — centralize authorization decisions in Rego.
TLS Everywhere
Frontend TLS/mTLS, backend mTLS, database TLS, CP/DP channel mTLS, DTLS for UDP — with configurable cipher suites, live certificate reload, OCSP stapling, and CRL checking on client-certificate, backend and plugin-egress verification, including the CP checking DP client certificates (not a DP checking the CP's server certificate).
SSRF-Safe Egress
Backend egress policy blocks cloud metadata and dangerous IP ranges by default, enforced at config, DNS-resolution, and connection time. DNS-rebinding safe.
Anti-Smuggling Validation
Content-Length/Transfer-Encoding conflict rejection, multiple-Host rejection, TRACE blocking, canonical request paths, and slowloris header timeouts on every frontend.
Access Restrictions
IP/CIDR allow and deny lists, GeoIP country restrictions, bot detection, per-IP concurrency caps, and admin API CIDR allowlists.
Secure Admin Plane
Admin listeners bind loopback by default; writable modes refuse public plaintext admin without an allowlist. JWT-protected, with read-only mode and an audit trail.
Contract Enforcement
JSON Schema, XML, and protobuf body validation plus OpenAPI request/response contract enforcement generated from your specs.
Zero-Downtime Credential Rotation
Consumers hold multiple active credentials of each type, so API keys, JWT secrets, and HMAC secrets rotate without a cutover window.
HSM Keys & FIPS Profile
Opt-in builds add PKCS#11 non-extractable RSA keys for frontend, admin, and backend mTLS (pkcs11 feature) and a fips profile that routes cryptography through the AWS-LC FIPS module.
Flexible, Fast Request Routing
Prefix & Exact Match
Exact-path routes take priority, then longest prefix match through an indexed O(path-depth) walk, with a bounded O(1) lookup cache for repeated paths. The route table is rebuilt atomically on config changes.
Host-Based Routing
Exact and wildcard host matching (*.example.com), plus host-only proxies that match any path under a host.
Regex Routes
Auto-anchored full-path regex matching, with named captures forwarded to backends and plugins as headers.
Method Filtering
Per-proxy allowed-method lists with proper 405 responses.
Path Rewriting
Strip listen paths, prepend backend path prefixes, and override paths per upstream target.
Spec-Driven Provisioning
Submit an OpenAPI/Swagger document to atomically provision a proxy, upstream, and plugins in one Admin API call — optionally publishing its operations as MCP tools.
Dynamic Upstream Discovery
DNS-SD
SRV-record discovery with health-aware RFC 2782 priority tiers and configurable polling.
Kubernetes
Endpoint discovery from the Kubernetes API with namespace scoping and named ports.
Consul
Healthy-instance discovery with datacenter selection and ACL tokens.
Ferrum Mesh
Resolves mesh services and workload SPIFFE references into upstream targets with identity metadata.
Discovered targets merge with statically defined ones, providers poll in the background without blocking traffic, and the last-known target list is retained if a provider becomes unreachable.
Secure Credential Handling
Any FERRUM_* setting can be loaded from an external secret source with a suffixed variable — no code changes. Published binaries and images include all four cloud backends.
Environment & Files
Direct values or file references (FERRUM_X_FILE) — compatible with Docker secrets, Kubernetes volume mounts, and Vault Agent injection. Always available.
HashiCorp Vault
KV v2 secrets with key selection (FERRUM_X_VAULT=secret/data/gw#key) and private-CA TLS trust.
AWS Secrets Manager
Name or ARN references with the standard AWS credential chain — IAM roles, instance profiles, and IRSA.
GCP Secret Manager
Application Default Credentials with Workload Identity support on GKE.
Azure Key Vault
Vault URL references with service principal authentication.
Fail-Safe Resolution
Conflicting sources fail startup loudly, resolved references are scrubbed from the environment, and each fetch has a bounded timeout.
Full Visibility Into Every Request
OpenTelemetry
W3C Trace Context propagation with OTLP/HTTP span export, a span per backend attempt, and rich semantic attributes. Mesh telemetry also exports to Zipkin, Datadog, and Lightstep.
Prometheus
Exposition endpoint plus a JWT-gated runtime metrics snapshot: HTTP status windows, error classes, DNS outcomes, pool churn, and overload state.
Log Shipping
Structured JSON to stdout, HTTP collectors (Datadog, Splunk, Elastic, and more), Grafana Loki, Kafka, TCP/TLS, UDP/DTLS, WebSocket, and StatsD — batched through bounded, non-blocking buffers.
Proxy Alerts
In-gateway anomaly notifications to Slack, Teams, Discord, PagerDuty, webhooks, or email — error rates, latency percentiles, status spikes, and disconnect causes.
API Chargeback
Per-consumer usage charging across calls, bandwidth, and stream sessions — including TCP/UDP traffic — exported in Prometheus and JSON formats, with durable delivery to ClickHouse for billing.
Custom Log Schemas
Rename, drop, reorder, and derive log fields per sink without forking the gateway. Sensitive-key redaction always applies.
Tuned From Kernel to Plugin
Lock-Free Config Reads
Configuration and route-table snapshots are read with a single atomic ArcSwap load, so configuration changes never stall traffic. Sharded maps such as the route cache take a short per-shard read lock.
Connection Pool Warmup
Backend connections and DNS entries pre-established at startup to eliminate first-request cold starts.
Adaptive Buffers
Copy buffers and UDP batch limits tune themselves per proxy from observed traffic — small messages save memory, bulk transfers save syscalls.
Parallel Accept Loops
Multiple accept loops per listener scale with CPU cores on one exclusively bound socket, absorbing connection storms without a single-acceptor bottleneck.
Kernel-Level Tuning
TCP Fast Open, deferred ephemeral-port allocation, zero-copy splice and kTLS stream relays, and port-exhaustion detection on Linux, plus the jemalloc allocator.
Smart Caching
Frequency-aware route cache eviction, cacheability prediction, RED-style adaptive load shedding, and bounded caches everywhere.
Zero-Downtime Management
- JWT-protected Admin REST API with full CRUD, read-only mode, and an audit log
- Batch operations, full config backup/restore, and dependency-fenced deployment changes
- Namespaces isolate teams, with JWT tenancy claims on the admin and CP planes
- OpenAPI spec import provisions proxy + upstream + plugins atomically
- Zero-downtime reload via DB polling, SIGHUP, or CP push
- Atomic config swap — no partial config ever visible to requests
- Hundreds of
FERRUM_*settings as environment variables, with optionalferrum.confdefaults - Ferrum Foundry admin panel for visual management
Custom Plugins in Rust
- Drop-in
custom_plugins/directory, auto-discovered at build time - Hooks at every lifecycle stage — request, auth, admission, body, frames, datagrams, logging
- Plugins can declare their own database migrations
- Global, per-proxy, and proxy-group scoping with priority overrides
- Multiple instances of the same plugin per proxy
- Full compiler-checked type safety — no scripting sandbox
Choose the Build for Your Deployment
All 81 plugins are in every build. Published v0.9.21 binaries and images also include the cloud-secret backends; default source builds need cloud-secrets or a provider-specific feature. Real Linux eBPF capture requires the -ebpf image; iptables fallback and the Ambient UDP lifecycle need -ebpf-tools. ACME (acme), PKCS#11 (pkcs11), and FIPS (fips) are opt-in source-build features that published artifacts do not include. Node waypoint remains experimental.