Skip to content

Commit

Permalink
Merge branch 'main' into mbg/ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gumpt committed Feb 29, 2024
2 parents 5ba2494 + 8797329 commit cabd7e6
Show file tree
Hide file tree
Showing 276 changed files with 47,995 additions and 15 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**/target
Cargo.lock
/target
**/*.rs.bk
**/Cargo.lock
**/dhat-heap.json
dhat-heap.json
.vscode
.cover
.idea
.cover
Empty file added .rustfmt.toml
Empty file.
35 changes: 34 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
[workspace]
resolver = "2"
members = [
"pingora",
"pingora-core",
"pingora-pool",
"pingora-error",
"pingora-limits",
]
"pingora-timeout",
"pingora-header-serde",
"pingora-proxy",
"pingora-cache",
"pingora-http",
"pingora-lru",
"pingora-openssl",
"pingora-boringssl",
"pingora-runtime",
"pingora-ketama",
"pingora-load-balancing",
"pingora-memory-cache",
"tinyufo",
]

[workspace.dependencies]
tokio = "1"
async-trait = "0.1.42"
httparse = "1"
bytes = "1.0"
http = "1.0.0"
log = "0.4"
h2 = ">=0.4.2"
once_cell = "1"
lru = "0"
ahash = ">=0.8.9"

[profile.bench]
debug = true
64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Pingora

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![Pingora banner image](./docs/assets/pingora_banner.png)

A library for building fast, reliable and evolvable network services.
## What is Pingora
Pingora is a Rust framework to [build fast, reliable and programmable networked systems](https://blog.cloudflare.com/pingora-open-source).

Pingora is battle tested as it has been serving more than 40 million Internet requests per second for [more than a few years](https://blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet).

## Feature highlights
* Async Rust: fast and reliable
* HTTP 1/2 end to end proxy
* TLS over OpenSSL or BoringSSL
* gRPC and websocket proxying
* Graceful reload
* Customizable load balancing and failover strategies
* Support for a variety of observability tools

## Reasons to use Pingora
* **Security** is your top priority: Pingora is a more memory safe alternative for services that are written in C/C++.
* Your service is **performance-sensitive**: Pingora is fast and efficient.
* Your service requires extensive **customization**: The APIs Pingora proxy framework provides are highly programmable.

# Getting started

See our [quick starting guide](./docs/quick_start.md) to see how easy it is to build a load balancer.

Our [user guide](./docs/user_guide/index.md) covers more topics such as how to configure and run Pingora servers, as well as how to build custom HTTP server and proxy logic on top of Pingora's framework.

API docs are also available for all the crates.

# Notable crates in this workspace
* Pingora: the "public facing" crate to build to build networked systems and proxies.
* Pingora-core: this crates defined the protocols, functionalities and basic traits.
* Pingora-proxy: the logic and APIs to build HTTP proxies.
* Pingora-error: the common error type used across Pingora crates
* Pingora-http: the HTTP header definitions and APIs
* Pingora-openssl & pingora-boringssl: SSL related extensions and APIs
* Pingora-ketama: the [Ketama](https://github.com/RJ/ketama) consistent algorithm
* Pingora-limits: efficient counting algorithms
* Pingora-load-balancing: load balancing algorithm extensions for pingora proxy
* Pingora-memory-cache: Async in-memory caching with cache lock to prevent cache stampede.
* Pingora-timeout: A more efficient async timer system.
* TinyUfo: The caching algorithm behind pingora-memory-cache.

# 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)

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.

Our current MSRV is 1.72.

# Contributing
Please see our [contribution guidelines](./.github/CONTRIBUTING.md).

# License
This project is Licensed under [Apache License, Version 2.0](./LICENSE).
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Pingora User Manual

## Quick Start
In this section we show you how to build a barebones load balancer.

[Read the quick start here.](quick_start.md)

## User Guide
Covers how to configure and run Pingora servers, as well as how to build custom HTTP server and proxy logic on top of Pingora's framework.

[Read the user guide here.](user_guide/index.md)

## API Reference
TBD
Binary file added docs/assets/pingora_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit cabd7e6

Please sign in to comment.