Skip to main content

Crate ferryman

Crate ferryman 

Source
Expand description

ferryman — hyper-based reverse proxy service: the per-request handler (proxy), optional TLS termination (tls), and the hot-reload watcher (reload).

main.rs is a thin CLI wrapper around serve so integration tests can drive the same accept loop on an ephemeral port.

Modules§

proxy
Per-request handler. Looks up the routing table, rebuilds the URI for the chosen upstream, streams the request straight through via the shared hyper client, records metrics, and turns transport failures into circuit-breaker trips.
reload
Filesystem-watch driven hot-reload of the routing table.
tls
Optional TLS termination.

Constants§

LATENCY_BUCKETS
Latency buckets (seconds) for ferryman_request_duration_seconds, spanning sub-millisecond proxy hops up to upstream_timeout_secs’s default of 30s, so the slowest (about-to-time-out) requests still land in a real bucket instead of falling into +Inf.

Functions§

serve
Accept connections on listener and serve the proxy until shutdown resolves, then stop accepting and wait (up to GRACEFUL_SHUTDOWN_TIMEOUT, 25s) for in-flight connections to finish.

Type Aliases§

ProxyClient
Shared hyper client used to forward requests to upstreams. Bodies are streamed straight through (Incoming in, Incoming out), no buffering.