Introducing Pingora
What is Pingora?
Pingora is an advanced Rust framework designed to create fast, reliable, and programmable networked systems. It has been proven to handle over 40 million Internet requests per second, marking its reliability and efficiency through extensive use over several years.
Highlighted Features
Pingora shines with an impressive feature set, making it a robust choice for various networked systems:
- Async Rust: Provides a fast and reliable performance environment.
- HTTP 1/2 Proxy: Supports end-to-end proxy operations.
- TLS Security: Compatibility with OpenSSL or BoringSSL ensures secure data transfer.
- gRPC and WebSocket: Facilitates modern communication protocols.
- Graceful Reload: Allows servers to update without downtime.
- Customizable Load Balancing: Offers tailored load balancing and failover strategies.
- Observability Tools: Supports a wide array of tools for system monitoring and analysis.
Why Use Pingora?
- Security Focus: With its foundation in Rust, Pingora offers a more memory-safe environment compared to traditional C/C++ services.
- Performance Sensitivity: It's built for speed and efficiency, making it suitable for performance-critical applications.
- Extensive Customization: The framework provides highly programmable APIs, allowing for extensive customization.
Getting Started
For those eager to start using Pingora, the quick starting guide is an ideal resource to begin building a load balancer. Users can delve deeper into Pingora's capabilities via the comprehensive user guide, covering server configurations and custom HTTP server development, backed by detailed API documentation.
Key Components of Pingora
Pingora's robust framework is divided into several key components:
- Pingora: The main crate for building networked systems and proxies.
- Pingora-core: Establishes protocols and basic functionalities.
- Pingora-proxy: Set of tools and APIs for creating HTTP proxies.
- Pingora-error: Manages common error types across different components.
- Pingora-http: Focuses on HTTP headers and APIs.
- SSL Extensions: Includes Pingora-openssl and pingora-boringssl for TLS integration.
- Pingora-ketama: Implements the Ketama consistent hashing algorithm.
- Load Management: Features Pingora-limits and Pingora-load-balancing for efficient resource distribution.
- Cache Management: Pingora-memory-cache provides async in-memory caching, and TinyUfo offers robust caching algorithms.
- Timing Systems: An enhanced async timer system with Pingora-timeout.
System Requirements
Supported Systems
Linux stands as Pingora’s primary environment, with support also extended to Unix systems like macOS, although with potential feature limitations. Both x86_64 and aarch64 architectures are supported to cater to a wide range of hardware configurations.
Rust Compatibility
Pingora follows a 6-month rolling minimum supported Rust version (MSRV) policy to maintain compatibility, with the current MSRV set at Rust 1.72.
Build Prerequisites
Certain Pingora components depend on additional tools:
- Clang: Necessary for building with boringssl.
- Perl 5: Required for openssl-related builds.
Contributing and Licensing
Pingora welcomes contributors, with guidelines available in the contribution guide. The project is open-source, licensed under the Apache License, Version 2.0, inviting collaborative development and usage.
Pingora represents a cutting-edge approach to networked systems, offering a powerful Rust-based framework that emphasizes performance, security, and customization.