opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Cloudflare's Rust framework for building fast, programmable networked systems
GitHub RepoImpressions3

Project Description

View on GitHub

Cloudflare's Pingora: A Rust Framework for Proxies That Actually Need to Be Fast

You've got a service that needs to handle serious traffic. Maybe you're building a proxy, a load balancer, or some other networked system where every microsecond and every memory safety bug matters. You could reach for C or C++, but then you're signing up for a lifetime of segfaults and security audits. Pingora is Cloudflare's answer to that problem: a Rust framework for building fast, reliable, and programmable networked systems.

What It Does

Pingora is a Rust framework designed for building networked systems and proxies. It provides the building blocks you need to construct HTTP proxies, load balancers, and other services that sit between clients and backends. The framework handles HTTP 1 and 2 end to end, supports gRPC and websocket proxying, and works with multiple TLS implementations including OpenSSL, BoringSSL, s2n-tls, and rustls (though that last one is experimental).

The project is organized as a workspace of crates, each with a specific responsibility. The main pingora crate is your public-facing entry point. Underneath, you've got pingora-core for protocols and traits, pingora-proxy for the HTTP proxy logic, pingora-load-balancing for algorithm extensions, and a handful of others covering everything from error types to SSL extensions to caching. There's even a Ketama consistent hashing implementation tucked in there if you need it.

This isn't a weekend project. Cloudflare has been running Pingora in production for years, serving more than 40 million Internet requests per second. That's not a typo. The framework has been battle tested at a scale most of us will never see, which means the rough edges have largely been sanded down by real-world usage.

Why It's Cool

  • It's proven at scale. The README doesn't bury the lede here: Pingora has been handling over 40 million requests per second for years. That's the kind of number that makes you pay attention. You're not adopting some experimental framework that might fall over the first time you hit real traffic.

  • Memory safety without sacrificing performance. If you're currently running a C or C++ service and security is a concern (and it should be), Pingora offers a path to memory safety without the performance penalty you might expect from a higher-level language. Rust gives you the safety guarantees, and Pingora gives you the speed.

  • Multiple TLS backends. Rather than forcing you into one TLS implementation, Pingora supports OpenSSL, BoringSSL, s2n-tls, and rustls. That flexibility matters when you've got existing infrastructure or specific compliance requirements. You're not locked into a single vendor's crypto library.

  • Graceful reload. This is one of those features that sounds boring until you need it. Being able to reload your service without dropping connections is the difference between a routine deploy and a 3 AM incident. Pingora handles this out of the box.

  • Customizable load balancing and failover. The load balancing strategies aren't hardcoded. You can implement your own algorithms and failover logic, which means you're not stuck with whatever the framework authors decided was good enough.

  • Programmable APIs. The proxy framework is designed to be extended. You're not just configuring a black box; you're building on top of a set of APIs that let you define custom behavior at nearly every level.

There's also a nice collection of supporting crates that solve specific problems well. pingora-memory-cache gives you async in-memory caching with a cache lock to prevent stampede. pingora-timeout provides a more efficient async timer system. pingora-limits implements efficient counting algorithms. These aren't afterthoughts; they're the kind of utilities you end up needing when you build networked systems at scale.

How to Try It

Getting started is straightforward, though you'll need to make sure your environment is ready first. Pingora targets Linux as its tier 1 environment, though it'll compile on most Unix-like systems including macOS (with some features potentially missing). Windows support is preliminary and community-driven.

You'll need Rust 1.85 or later (Pingora follows a rolling MSRV policy of 6 months). You'll also need Clang installed if you're building with BoringSSL, and Perl 5 if you're using OpenSSL.

Once your environment is set up:

  1. Head over to the repository and clone it.
  2. Check out the quick starting guide to build a load balancer. It's a good way to get a feel for how the pieces fit together.
  3. For more depth, the user guide covers configuring and running Pingora servers, building custom HTTP servers, and writing custom proxy logic.
  4. API docs are available for all the crates if you want to dig into specifics.

One thing to note: the caching integration with the proxy is considered experimental, and the related APIs are described as highly volatile. If caching is central to what you're building, keep that in mind.

Final Thoughts

Pingora isn't for everyone. If you're building a simple web service, you probably don't need a proxy framework at all. But if you're building infrastructure—load balancers, API gateways, service meshes, or anything that sits in the request path at scale—this is worth serious consideration. The fact that Cloudflare runs it in production at massive scale is a strong signal that it's ready for real work. The Rust foundation gives you memory safety and performance, and the crate structure means you can pull in just the pieces you need. It's a solid foundation for anyone who needs to build networked systems that can't afford to be slow or unsafe.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: 7c64a75f-1947-42ef-bdcf-5e9ee75813e7Last updated: September 15, 2026 at 03:44 AM