Skip to content

Commit 8797329

Browse files
eaufavorandrewhavckdrcaramelsyrup
committed
Release Pingora version 0.1.0
Co-authored-by: Andrew Hauck <[email protected]> Co-authored-by: Edward Wang <[email protected]>
1 parent 0bca116 commit 8797329

File tree

279 files changed

+48111
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+48111
-18
lines changed

.github/CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing
2+
3+
Welcome to Pingora! Before you make a contribution, be it a bug report, documentation improvement,
4+
pull request (PR), etc., please read and follow these guidelines.
5+
6+
## Start with filing an issue
7+
8+
More often than not, **start by filing an issue on GitHub**. If you have a bug report or feature
9+
request, open a GitHub issue. Non-trivial PRs will also require a GitHub issue. The issue provides
10+
us with a space to discuss proposed changes with you and the community.
11+
12+
Having a discussion via GitHub issue upfront is the best way to ensure your contribution lands in
13+
Pingora. We don't want you to spend your time making a PR, only to find that we won't accept it on
14+
a design basis. For example, we may find that your proposed feature works better as a third-party
15+
module built on top of or for use with Pingora and encourage you to pursue that direction instead.
16+
17+
**You do not need to file an issue for small fixes.** What counts as a "small" or trivial fix is a
18+
judgment call, so here's a few examples to clarify:
19+
- fixing a typo
20+
- refactoring a bit of code
21+
- most documentation or comment edits
22+
23+
Still, _sometimes_ we may review your PR and ask you to file an issue if we expect there are larger
24+
design decisions to be made.
25+
26+
## Making a PR
27+
28+
After you've filed an issue, you can make your PR referencing that issue number. Once you open your
29+
PR, it will be labelled _needs review_. A maintainer will review your PR as soon as they can. The
30+
reviewer may ask for changes - they will mark the PR as _changes requested_ and _work in progress_
31+
and will give you details about the requested changes. Feel free to ask lots of questions! The
32+
maintainers are there to help you.
33+
34+
### Caveats
35+
36+
Currently, internal contributions will take priority. Today Pingora is being maintained by
37+
Cloudflare's Content Delivery team, and internal Cloudflare proxy services are a primary user of
38+
Pingora. We value the community's work on Pingora, but the reality is that our team has a limited
39+
amount of resources and time. We can't promise we will review or address all PRs or issues in a
40+
timely manner.
41+
42+
## Conduct
43+
44+
Pingora and Cloudflare OpenSource generally follows the [Contributor Covenant Code of Conduct].
45+
Violating the CoC could result in a warning or a ban to Pingora or any and all repositories in the Cloudflare organization.
46+
47+
[Contributor Covenant Code of Conduct]: https://github.com/cloudflare/.github/blob/26b37ca2ba7ab3d91050ead9f2c0e30674d3b91e/CODE_OF_CONDUCT.md
48+
49+
## Contact
50+
51+
If you have any questions, please reach out to [[email protected]](mailto:[email protected]).

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug Report
3+
about: Report an issue to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Describe the bug
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Pingora info
14+
15+
Please include the following information about your environment:
16+
17+
**Pingora version**: release number of commit hash
18+
**Rust version**: i.e. `cargo --version`
19+
**Operating system version**: e.g. Ubuntu 22.04, Debian 12.4
20+
21+
## Steps to reproduce
22+
23+
Please provide step-by-step instructions to reproduce the issue. Include any relevant code
24+
snippets.
25+
26+
## Expected results
27+
28+
What were you expecting to happen?
29+
30+
## Observed results
31+
32+
What actually happened?
33+
34+
## Additional context
35+
36+
What other information would you like to provide? e.g. screenshots, how you're working around the
37+
issue, or other clues you think could be helpful to identify the root cause.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Propose a new feature
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## What is the problem your feature solves, or the need it fulfills?
10+
11+
A clear and concise description of why this feature should be added. What is the problem? Who is
12+
this for?
13+
14+
## Describe the solution you'd like
15+
16+
What do you propose to resolve the problem or fulfill the need above? How would you like it to
17+
work?
18+
19+
## Describe alternatives you've considered
20+
21+
What other solutions, features, or workarounds have you considered that might also solve the issue?
22+
What are the tradeoffs for these alternatives compared to what you're proposing?
23+
24+
## Additional context
25+
26+
This could include references to documentation or papers, prior art, screenshots, or benchmark
27+
results.

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
**/target
1+
Cargo.lock
2+
/target
23
**/*.rs.bk
3-
**/Cargo.lock
4-
**/dhat-heap.json
4+
dhat-heap.json
55
.vscode
6-
.cover
6+
.idea
7+
.cover

.rustfmt.toml

Whitespace-only changes.

Cargo.toml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
[workspace]
2+
resolver = "2"
23
members = [
4+
"pingora",
5+
"pingora-core",
6+
"pingora-pool",
7+
"pingora-error",
38
"pingora-limits",
4-
]
9+
"pingora-timeout",
10+
"pingora-header-serde",
11+
"pingora-proxy",
12+
"pingora-cache",
13+
"pingora-http",
14+
"pingora-lru",
15+
"pingora-openssl",
16+
"pingora-boringssl",
17+
"pingora-runtime",
18+
"pingora-ketama",
19+
"pingora-load-balancing",
20+
"pingora-memory-cache",
21+
"tinyufo",
22+
]
23+
24+
[workspace.dependencies]
25+
tokio = "1"
26+
async-trait = "0.1.42"
27+
httparse = "1"
28+
bytes = "1.0"
29+
http = "1.0.0"
30+
log = "0.4"
31+
h2 = ">=0.4.2"
32+
once_cell = "1"
33+
lru = "0"
34+
ahash = ">=0.8.9"
35+
36+
[profile.bench]
37+
debug = true

README.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
# Pingora
22

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

5-
A library for building fast, reliable and evolvable network services.
5+
## What is Pingora
6+
Pingora is a Rust framework to [build fast, reliable and programmable networked systems](https://blog.cloudflare.com/pingora-open-source).
7+
8+
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).
9+
10+
## Feature highlights
11+
* Async Rust: fast and reliable
12+
* HTTP 1/2 end to end proxy
13+
* TLS over OpenSSL or BoringSSL
14+
* gRPC and websocket proxying
15+
* Graceful reload
16+
* Customizable load balancing and failover strategies
17+
* Support for a variety of observability tools
18+
19+
## Reasons to use Pingora
20+
* **Security** is your top priority: Pingora is a more memory safe alternative for services that are written in C/C++.
21+
* Your service is **performance-sensitive**: Pingora is fast and efficient.
22+
* Your service requires extensive **customization**: The APIs Pingora proxy framework provides are highly programmable.
23+
24+
# Getting started
25+
26+
See our [quick starting guide](./docs/quick_start.md) to see how easy it is to build a load balancer.
27+
28+
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.
29+
30+
API docs are also available for all the crates.
31+
32+
# Notable crates in this workspace
33+
* Pingora: the "public facing" crate to build to build networked systems and proxies.
34+
* Pingora-core: this crates defined the protocols, functionalities and basic traits.
35+
* Pingora-proxy: the logic and APIs to build HTTP proxies.
36+
* Pingora-error: the common error type used across Pingora crates
37+
* Pingora-http: the HTTP header definitions and APIs
38+
* Pingora-openssl & pingora-boringssl: SSL related extensions and APIs
39+
* Pingora-ketama: the [Ketama](https://github.com/RJ/ketama) consistent algorithm
40+
* Pingora-limits: efficient counting algorithms
41+
* Pingora-load-balancing: load balancing algorithm extensions for pingora proxy
42+
* Pingora-memory-cache: Async in-memory caching with cache lock to prevent cache stampede.
43+
* Pingora-timeout: A more efficient async timer system.
44+
* TinyUfo: The caching algorithm behind pingora-memory-cache.
45+
46+
# System requirements
47+
48+
## Systems
49+
Linux is our tier 1 environment and main focus.
50+
51+
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)
52+
53+
Both x86_64 and aarch64 architectures will be supported.
54+
55+
## Rust version
56+
57+
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.
58+
59+
Our current MSRV is 1.72.
60+
61+
# Contributing
62+
Please see our [contribution guidelines](./.github/CONTRIBUTING.md).
63+
64+
# License
65+
This project is Licensed under [Apache License, Version 2.0](./LICENSE).

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Pingora User Manual
2+
3+
## Quick Start
4+
In this section we show you how to build a barebones load balancer.
5+
6+
[Read the quick start here.](quick_start.md)
7+
8+
## User Guide
9+
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.
10+
11+
[Read the user guide here.](user_guide/index.md)
12+
13+
## API Reference
14+
TBD

docs/assets/pingora_banner.png

235 KB
Loading

0 commit comments

Comments
 (0)