A web-based tool for measuring bufferbloat in network connections, inspired by the Waveform Bufferbloat Test. This project focuses on accuracy, clarity, and HTTP-only performance testing.
LibreQoS Bufferbloat Test measures how your network connection performs under load, specifically focusing on latency increases that occur during high bandwidth utilization (bufferbloat). The test runs for 30 seconds and provides a comprehensive analysis of your connection's performance.
- 30-second unified test flow divided into 4 sequential stages
- Accurate latency measurement every 200ms using synchronized timestamps
- Background throughput sampling for statistical analysis
- Clear visualization of latency over time
- Comprehensive results including bufferbloat grading (A+ to F)
- HTTP/2 support for improved performance and connection multiplexing
- Dark theme UI with LibreQoS branding
The test runs as a single 30-second process divided into 4 sequential stages:
- Baseline (0s-5s): Measures unloaded latency
- Download Saturation (5s-15s): Observes latency under download load
- Upload Saturation (15s-25s): Observes latency under upload load
- Bidirectional Saturation (25s-30s): Observes latency under simultaneous download and upload load
- HTML/CSS/JavaScript frontend that runs in any modern web browser
- Web Worker for latency measurements
- Chart.js for latency visualization
- ES Modules for code organization
- Python FastAPI backend for Ubuntu Server 22.04 or 24.04
- HTTP/2 support with Hypercorn for multiplexed connections
- Efficient streaming of binary data
- High concurrency support for gigabit connection testing
The test assigns a grade based on the additional latency under load:
Latency Increase | Grade |
---|---|
< 5 ms | A+ |
< 30 ms | A |
< 60 ms | B |
< 200 ms | C |
< 400 ms | D |
≥ 400 ms | F |
The final grade is the lower of the download and upload scores.
server/
├── main.py # FastAPI application entry point
├── ping.py # Ping endpoint for latency measurement
├── download.py # Download endpoint for downstream saturation
├── upload.py # Upload endpoint for upstream saturation
├── __init__.py # Python package marker
├── test_endpoints.py # Test script for server endpoints
└── requirements.txt # Python dependencies with Hypercorn for HTTP/2
client/
├── index.html # Main HTML page
├── style.css # CSS styles
├── app.js # Main application logic
├── latencyWorker.js # Web Worker for latency measurements
├── timelineChart.js # Chart.js configuration and handling
├── saturation.js # Download and upload saturation logic
├── results.js # Results analysis and display
└── ui.js # User interface interactions
-
Install dependencies:
pip install -r server/requirements.txt
-
Run the server:
python3 server/main.py
The server will run on port 80 by default.
For production deployments, you can run the application as a systemd service:
-
Use the provided installation script:
sudo ./install_service.sh
This will install and start the service automatically.
-
Alternatively, follow the manual setup instructions in
SYSTEMD_SETUP.md
. -
Once installed as a service, the application will:
- Start automatically on system boot
- Restart automatically if it crashes
- Log output to the system journal
For more details, see the Systemd Setup Guide.
For secure access with improved performance, you can set up HTTPS with HTTP/2 support using Let's Encrypt certificates:
-
Use the provided HTTPS setup script:
sudo ./setup_https.sh yourdomain.example.com
-
The script will:
- Obtain Let's Encrypt certificates for your domain
- Configure the application to use HTTPS with HTTP/2 support
- Set up automatic certificate renewal
-
HTTP/2 Benefits:
- Connection Multiplexing: Overcomes the browser's 6-connection limit
- Higher Concurrency: Supports hundreds of concurrent streams over a single connection
- Better Performance: Ideal for testing gigabit connections
-
For manual setup or more details, see the HTTPS Setup Guide.
Once the server is running, access the test by navigating to:
http://your-server-ip:80/
Or if you've set up HTTPS:
https://yourdomain.example.com/
Replace your-server-ip
with the IP address of your server or yourdomain.example.com
with your actual domain name.
- The server uses auto-reload feature for development
- HTTP/2 support requires HTTPS (TLS) and the
--http2
flag - The client is served as static files by the FastAPI application
- All client-side code uses ES modules for better organization
This project is open source and available under the MIT License.