Pingora is a Rust toolkit for building networked systems such as load balancers and HTTP proxies with async I/O, TLS, and customizable balancing. Cloudflare uses it in production at very high request volumes.
Overview
Developers assemble services from workspace crates that cover core protocols, proxy APIs, HTTP headers, OpenSSL and BoringSSL integrations, load-balancing extensions, in-memory caching, timers, and shared error types. The proxy layer supports HTTP/1 and HTTP/2 end-to-end forwarding, gRPC, websockets, graceful reload, and pluggable observability hooks.
The project targets teams who want memory-safe replacements for C or C++ edge software, need low overhead, or require deep programmatic control over failover and routing. Documentation includes quick-start load balancer examples, a user guide for server configuration, and crate-level API references.
Tier-one support focuses on Linux on x86_64 and aarch64, with most code compiling on other Unix systems like macOS for development. Windows builds are preliminary community efforts. Building some crates needs Clang for BoringSSL and Perl for OpenSSL.
Experimental proxy caching APIs exist via the memory-cache crate but are marked volatile. Pingora is Apache 2.0 licensed.
Key features
- Async Rust HTTP proxy core
- HTTP/1 and HTTP/2 forwarding
- TLS via OpenSSL, BoringSSL, or s2n
- gRPC and WebSocket proxying
- Graceful configuration reload
- Custom load balancing policies
- In-memory cache with stampede locks
- Observability hook integrations
Use cases
- Custom edge load balancers
- Replacing C++ reverse proxy daemons
- High-throughput API gateways
- Programmable traffic failover logic
- Rust-based HTTP middleware services