Expand description
§RAT Congestion Control Library
A high-performance, platform-optimized congestion control library implementing BBR and CUBIC algorithms with intelligent switching capabilities.
This library is designed as a pure computational engine that processes network data provided by the caller, without collecting any system data itself.
§Features
- Pure Computation: No system data collection, all data provided by caller
- BBR Algorithm: Google’s Bottleneck Bandwidth and Round-trip propagation time algorithm
- CUBIC Algorithm: High-performance CUBIC congestion control with optimizations
- Intelligent Switching: Dynamic algorithm selection based on network conditions
- Platform Optimizations: Automatic platform detection and SIMD optimizations
- Zero-Copy Design: Minimal allocations and efficient batch processing
- Unified Entry Point: Single API for all platforms, auto-configured
§Quick Start
use rat_congestion::{CongestionController, PacketEvent};
use std::time::Duration;
// Create a controller with automatic platform optimization
// Note: In real usage, you need to provide NetworkMetrics and MetricsWindow implementations
// let mut controller = CongestionController::new(metrics, metrics_window);§Advanced Usage
use rat_congestion::{CongestionController, ControllerConfig};
// Create with custom configuration
let config = ControllerConfig::builder()
.initial_algorithm("bbr")
.auto_switching(true)
.build();
// Note: In real usage, you need to provide NetworkMetrics and MetricsWindow implementations
// let mut controller = CongestionController::with_config(config, metrics, metrics_window);Structs§
- Bbr
- BBR congestion control algorithm with performance optimizations.
- Congestion
Config - Configuration for the congestion manager.
- Congestion
Controller - Unified congestion control interface with automatic platform optimization.
- Congestion
Manager - High-performance congestion control manager.
- Controller
Config - Configuration for the congestion controller.
- Controller
Config Builder - Configuration builder for the congestion controller.
- Cubic
- CUBIC congestion control algorithm with performance optimizations.
Enums§
- Algorithm
Type - Algorithm selection strategy.
- Congestion
Event - Events that trigger congestion control algorithm updates.
Constants§
- DEFAULT_
MSS - Default packet size (bytes)
- INITIAL_
CWND - Default initial congestion window (packets)
- MIN_
CWND - Minimum congestion window (packets)
- PLATFORM
- Detect the current platform at compile time.
Traits§
- Congestion
Control Algorithm - Core trait for congestion control algorithms.
- Metrics
Window - Trait for metrics window (rolling statistics)
- Network
Metrics - Trait for network metrics collection