HTTP server.
Written in Zig.
HTTP/1.1, HTTP/2, and HTTP/3 over QUIC. Reverse proxy, TLS 1.3, rate limiting, observability, native x402 payments. Single binary, no runtime dependencies.
Built for production
Everything you need to run production traffic. One binary, no runtime dependencies.
HTTP/1.1 + HTTP/2 + HTTP/3
Full protocol support including HPACK compression, QUIC transport, and keep-alive connection pooling.
Reverse proxy
Load balancing, health checks, WebSocket proxy, gRPC-aware routing. Traffic splitting for canary and blue-green deploys.
TLS 1.3 + mTLS
SNI multi-certificate TLS, mutual TLS client verification, HSTS, CSP, CORS. API key and JWT authentication built in.
Minimal allocations
Fixed-size buffer pools and stack-allocated parsing for HTTP/1.1. Lightweight allocators for H2 HPACK and QUIC state. No garbage collection.
Observability
Prometheus metrics, OpenTelemetry traces, structured JSON logging. Health probes and admin API for runtime management.
Hot reload
SIGHUP reloads routes and upstreams without dropping connections. Multi-worker with SO_REUSEPORT for zero-downtime deploys.
Rate limiting
Per-IP and per-consumer rate limiting. Request body validation with JSON Schema. Response caching with LRU eviction.
Service discovery
DNS and Consul service discovery for upstream resolution. Traffic mirroring for shadow testing production traffic.
Get started
Requires Zig 0.16.0 (stable) and OpenSSL 3.5+ for TLS/HTTP-2/HTTP-3.
Native x402 payment protocol
swerver speaks x402 natively. Gate any endpoint behind pay-per-request USDC payments. No billing service, no API keys, no invoices. The protocol handles payment verification at the edge before traffic hits your upstream.
Monetize AI inference, data feeds, premium APIs. Anything with a URL. Pricing from $0.001 to $100 per request.
x402 platform →