pingora README

The project's README from github.com/cloudflare/pingora. As one markdown file: README.md.

Pingora

Pingora banner image

What is Pingora

Pingora is a Rust framework to build fast, reliable and programmable networked systems.

Pingora is battle tested as it has been serving more than 40 million Internet requests per second for more than a few years.

Feature highlights

Reasons to use Pingora

Getting started

See our quick starting guide to see how easy it is to build a load balancer.

Our user guide covers more topics such as how to configure and run Pingora servers, as well as how to build custom HTTP servers and proxy logic on top of Pingora's framework.

API docs are also available for all the crates.

Notable crates in this workspace

Note that Pingora proxy integration with caching should be considered experimental, and as such APIs related to caching are currently highly volatile.

System requirements

Systems

Linux is our tier 1 environment and main focus.

We will try our best for most code to compile for Unix environments. This is for developers and users to have an easier time developing with Pingora in Unix-like environments like macOS (though some features might be missing)

Windows support is preliminary by community's best effort only.

Both x86_64 and aarch64 architectures will be supported.

Rust version

Pingora keeps a rolling MSRV (minimum supported Rust version) policy of 6 months. This means we will accept PRs that upgrade the MSRV as long as the new Rust version used is at least 6 months old. However, we generally will not bump the highest MSRV across the workspace without a sufficiently compelling reason.

Our current MSRV is 1.85.

Currently not all crates enforce rust-version as it is possible to use some crates on lower versions.

Build Requirements

Some of the crates in this repository have dependencies on additional tools and libraries that must be satisfied in order to build them:

Contributing

Please see our contribution guidelines.

License

This project is Licensed under Apache License, Version 2.0.

pingora (cloudflare/pingora)

Searching Database…

27.6K ·GitHub
这是什么?Pingora 是 Cloudflare 推出的 Rust 框架,用于构建快速、可靠且可编程的网络服务和代理。它经过了实战检验,多年来每秒处理超过 4000 万个互联网请求。
这是现成的代理服务器,还是需要我在其上构建的框架?它是一个框架,由多个 Rust crate 组成(pingora-core、pingora-proxy、pingora-load-balancing 等)。你可以用它们组装自己的代理或网络服务,而不是直接拿来用的独立代理程序。
我该如何开始用它构建东西?先按照快速入门指南构建一个简单的负载均衡器,然后参阅用户指南,学习如何配置和运行 Pingora 服务器,以及基于框架的 API 构建自定义 HTTP 代理逻辑。
构建它需要安装哪些软件?你需要安装 Clang(BoringSSL 构建所必需)和 Perl 5(OpenSSL 所必需),以及至少 1.85 版本的 Rust 工具链,因为 Pingora 的最低支持 Rust 版本(MSRV)采用滚动 6 个月的策略。
在 Linux 之外的系统上运行效果也一样好吗?Linux 是一级支持、也是主要的开发环境。macOS 出于开发便利而受到支持,不过部分功能可能缺失;Windows 的支持仅处于初步阶段,由社区尽力维护。
Pingora 可以使用哪些 TLS 后端?支持的 TLS 后端包括 OpenSSL、BoringSSL 和 s2n-tls,rustls 目前标注为实验性支持。
我能用它构建缓存代理吗?有一个 pingora-memory-cache crate,用于异步内存缓存,并带有缓存锁机制,可防止缓存惊群(大量请求同时击穿缓存)。但它与 pingora-proxy 的缓存集成被明确标注为实验性功能,API 不稳定,可能随时变动。
为什么我要选择 Pingora,而不是 C/C++ 编写的代理?作为传统上用 C/C++ 编写的服务的 Rust 替代方案,Pingora 能带来内存安全保障,同时在对性能要求高的工作负载中,仍能提供相当的速度和效率。
它支持 gRPC 和 WebSocket 流量吗?支持。Pingora 内置了 gRPC 和 WebSocket 代理功能,是其亮点功能,同时也支持 HTTP/1 和 HTTP/2 的端到端代理。
What are similar projects?nginx, tengine, brpc, actix-web, node-http-proxy, workflow, warp, busbar
Creator
cloudflare
Size
6.5 MB
Stars
27.6K
Age
3y
Commits · 90 Days