Open sourcing Pingora: our Rust framework for building programmable network services
Cloudflare has open sourced Pingora, its Rust framework used for building services that power significant portions of traffic on the platform. The Apache License version 2.0-licensed Pingora is an async multithreaded framework designed to assist in constructing HTTP proxy services. It has handled nearly a quadrillion Internet requests across Cloudflare's global network since its last blog post. The release of Pingora aims to help build a better and more secure internet beyond Cloudflare's infrastructure, providing tools, ideas, and inspiration for customers, users, and others to build their own internet infrastructure using a memory-safe framework. Collaborating with the Internet Security Research Group (ISRG) Prossimo project, Pingora is expected to advance adoption in critical internet infrastructure. Pingora provides libraries and APIs to build services on top of HTTP/1 and HTTP/2, TLS, or just TCP/UDP. It supports HTTP/1 and HTTP/2 end-to-end, gRPC, and websocket proxying, with HTTP/3 support planned for the future. Pingora also offers customizable load balancing and failover strategies, as well as compatibility with OpenSSL and BoringSSL libraries for security and compliance purposes. The open source framework is beneficial for those prioritizing security, performance-sensitive services, or requiring extensive customization. It provides filters and callbacks to allow users to fully customize how the service should process, transform, and forward requests. Pingora also supports zero downtime graceful restarts and integration with observability tools like Syslog, Prometheus, Sentry, OpenTelemetry, etc. A simple load balancer example demonstrates Pingora's programmable API, highlighting its potential for building customized gateways or load balancers. The framework is not an executable binary but a library and toolset that can be used to power various applications. While the API stability is not guaranteed at this stage, support for non-Unix based operating systems is not currently on the roadmap. Contributions are welcome via GitHub issue tracker or pull requests following the contribution guide.
Company
Cloudflare
Date published
Feb. 28, 2024
Author(s)
Yuchen Wu, Edward Wang, Andrew Hauck
Word count
1447
Language
English
Hacker News points
31