Skip to content

What is Zion?

Zion is a TLS reverse proxy with a built-in WAF, written in Rust. One binary, one TOML config file, no runtime dependencies beyond libc.

Features

FeatureImplementation
TLS terminationrustls (aws-lc-rs crypto backend), TLS 1.2/1.3, ALPN, SNI
RoutingRadix tree via matchit crate
WAF5-gate pipeline: body size, content-type, Aho-Corasick (balanced or aggressive mode), Shannon entropy, simd-json structural validation
CachingIn-memory two-level cache: thread-local L1 + shared DashMap L2, TTL + max-entry eviction
WebSocketBidirectional proxy via HTTP Upgrade
SSE streamingDedicated proxy mode with buffer-disabling headers
CORSPre-flight OPTIONS handling, origin whitelist, configurable max-age
ObservabilityPrometheus /metrics, /healthz, /readyz, X-Request-ID
Security headersHSTS, X-Content-Type-Options, X-Frame-Options, Permissions-Policy
Rate limitingPer-IP via DashMap, configurable window and threshold
TLS hot-reloadFilesystem watcher (notify) + ArcSwap atomic pointer swap
Platform detectionReads CPU count, RAM, AES-NI, SO_REUSEPORT, TCP_FASTOPEN at boot

When to Use Zion

  • You need a TLS termination proxy with integrated request inspection
  • You are proxying to internal HTTP services (APIs, SSR frameworks, SPAs)
  • You want certificate rotation without process restarts
  • You want Prometheus metrics without a sidecar or agent

Comparison

CapabilityZionnginxEnvoyTraefik
LanguageRustCC++Go
Config formatTOMLCustom DSLYAML/xDSYAML/labels
Built-in WAFYes (Aho-Corasick)ModSecurity (plugin)NoNo
TLS hot-reloadYes (ArcSwap)reload signalSDS/xDSYes
In-memory cacheYes (DashMap)proxy_cache (disk)NoNo
WebSocketYesYesYesYes
Binary size~5 MB~1.5 MB~40 MB~100 MB
Config complexity1 fileMultiple filesHighModerate
Service meshNoNoYes (Istio)Yes (k8s)

Zion is not a service mesh or API gateway with plugin ecosystems. It is a single-purpose edge proxy for TLS termination, routing, WAF, and caching.

Released under the MIT License.