Overview
Pingora is the Rust framework Cloudflare built to replace NGINX at the core of its network. It is the engine behind proxies that have handled tens of millions of requests per second in production, and Cloudflare open-sourced it so anyone can build fast, memory-safe network services on the same foundation.
Rather than a ready-made server you configure with a text file, Pingora is a library: you write Rust code that hooks into each phase of a request, which makes it a strong fit for load balancers, API gateways, and reverse proxies that need custom logic.
Key Features
- Async Rust core: high throughput with the memory safety guarantees of Rust, avoiding whole classes of C/C++ vulnerabilities
- HTTP/1 and HTTP/2 end-to-end proxying, plus gRPC and WebSocket support
- Pluggable TLS: OpenSSL, BoringSSL, s2n-tls, or rustls (experimental)
- Graceful reloads without dropping in-flight connections
- Load balancing and failover with customizable strategies, including consistent hashing (Ketama)
- Built-in observability hooks for metrics and tracing
- Caching building blocks such as an async in-memory cache with stampede protection (TinyUFO algorithm)
Workspace Crates
| Crate | Purpose |
|---|---|
pingora |
Public entry point for building proxies and services |
pingora-proxy |
APIs and logic for HTTP proxies |
pingora-load-balancing |
Load-balancing algorithms and health checks |
pingora-memory-cache |
Async in-memory cache with cache locking |
pingora-limits |
Efficient counters for rate limiting |
pingora-openssl / pingora-boringssl / pingora-s2n |
TLS integrations |
Getting Started
Add Pingora to a Rust project and follow the official quick-start guide, which walks through building a simple load balancer:
cargo add pingora --features openssl,lb
The user guide in the repository covers configuring servers, writing custom proxy logic, and running services in production.
When to Use Pingora
- You need a programmable reverse proxy or load balancer with logic that goes beyond config files
- Your service is performance-sensitive and you want predictable latency under load
- Security matters and you want to move away from C/C++ network code
Requirements
Linux is the primary (tier 1) platform; most code also builds on other Unix systems such as macOS, while Windows support is community-maintained. Pingora follows a rolling six-month minimum supported Rust version policy.
License
Apache License 2.0.