Skip to content

Commit

Permalink
Release Pingora version 0.1.0
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Hauck <[email protected]>
Co-authored-by: Edward Wang <[email protected]>
  • Loading branch information
3 people committed Feb 28, 2024
1 parent 0bca116 commit 8797329
Show file tree
Hide file tree
Showing 279 changed files with 48,111 additions and 18 deletions.
51 changes: 51 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing

Welcome to Pingora! Before you make a contribution, be it a bug report, documentation improvement,
pull request (PR), etc., please read and follow these guidelines.

## Start with filing an issue

More often than not, **start by filing an issue on GitHub**. If you have a bug report or feature
request, open a GitHub issue. Non-trivial PRs will also require a GitHub issue. The issue provides
us with a space to discuss proposed changes with you and the community.

Having a discussion via GitHub issue upfront is the best way to ensure your contribution lands in
Pingora. We don't want you to spend your time making a PR, only to find that we won't accept it on
a design basis. For example, we may find that your proposed feature works better as a third-party
module built on top of or for use with Pingora and encourage you to pursue that direction instead.

**You do not need to file an issue for small fixes.** What counts as a "small" or trivial fix is a
judgment call, so here's a few examples to clarify:
- fixing a typo
- refactoring a bit of code
- most documentation or comment edits

Still, _sometimes_ we may review your PR and ask you to file an issue if we expect there are larger
design decisions to be made.

## Making a PR

After you've filed an issue, you can make your PR referencing that issue number. Once you open your
PR, it will be labelled _needs review_. A maintainer will review your PR as soon as they can. The
reviewer may ask for changes - they will mark the PR as _changes requested_ and _work in progress_
and will give you details about the requested changes. Feel free to ask lots of questions! The
maintainers are there to help you.

### Caveats

Currently, internal contributions will take priority. Today Pingora is being maintained by
Cloudflare's Content Delivery team, and internal Cloudflare proxy services are a primary user of
Pingora. We value the community's work on Pingora, but the reality is that our team has a limited
amount of resources and time. We can't promise we will review or address all PRs or issues in a
timely manner.

## Conduct

Pingora and Cloudflare OpenSource generally follows the [Contributor Covenant Code of Conduct].
Violating the CoC could result in a warning or a ban to Pingora or any and all repositories in the Cloudflare organization.

[Contributor Covenant Code of Conduct]: https://github.com/cloudflare/.github/blob/26b37ca2ba7ab3d91050ead9f2c0e30674d3b91e/CODE_OF_CONDUCT.md

## Contact

If you have any questions, please reach out to [[email protected]](mailto:[email protected]).
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug Report
about: Report an issue to help us improve
title: ''
labels: ''
assignees: ''
---

## Describe the bug

A clear and concise description of what the bug is.

## Pingora info

Please include the following information about your environment:

**Pingora version**: release number of commit hash
**Rust version**: i.e. `cargo --version`
**Operating system version**: e.g. Ubuntu 22.04, Debian 12.4

## Steps to reproduce

Please provide step-by-step instructions to reproduce the issue. Include any relevant code
snippets.

## Expected results

What were you expecting to happen?

## Observed results

What actually happened?

## Additional context

What other information would you like to provide? e.g. screenshots, how you're working around the
issue, or other clues you think could be helpful to identify the root cause.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature request
about: Propose a new feature
title: ''
labels: ''
assignees: ''
---

## What is the problem your feature solves, or the need it fulfills?

A clear and concise description of why this feature should be added. What is the problem? Who is
this for?

## Describe the solution you'd like

What do you propose to resolve the problem or fulfill the need above? How would you like it to
work?

## Describe alternatives you've considered

What other solutions, features, or workarounds have you considered that might also solve the issue?
What are the tradeoffs for these alternatives compared to what you're proposing?

## Additional context

This could include references to documentation or papers, prior art, screenshots, or benchmark
results.
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 8797329

Please sign in to comment.