A comprehensive network quality testing tool that measures bufferbloat - the hidden performance killer that affects real-world internet experience even when you have plenty of bandwidth.
Bufferbloat occurs when network equipment (routers, modems, ISP infrastructure) buffers too much data, causing latency spikes under load. You might have fast internet speeds but still experience:
- ๐ฎ Gaming lag during downloads/uploads
- ๐น Video call stuttering when others use the network
- ๐ Slow web browsing despite high bandwidth
- ๐ฑ Poor responsiveness on mobile devices
Unlike simple speed tests, this tool measures how your latency changes under load to detect bufferbloat and provide an overall network quality grade.
- Upload & Download Speed Tests - Measure raw bandwidth
- Baseline Latency Measurement - Establish unloaded performance
- Bufferbloat Detection - Test latency under realistic load conditions
- Jitter Analysis - Measure latency variation for consistency
- A+ to F grades based on real-world performance impact
- Separate analysis for upload and download directions
- Data quality validation ensures reliable measurements
- Severity classification from Minimal to Severe bufferbloat
- Environment detection - Optimized for localhost and remote testing
- Bandwidth limiting - Server-side throttling for controlled testing
- WebSocket + HTTP measurement - Dual protocols for reliability
- Real-time progress with detailed status updates
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/yourusername/bufferbloat-test.git
cd bufferbloat-test
# Install dependencies
npm install
# Start the server
npm start# Build the container
docker build -t bufferbloat-test .
# Run with default settings
docker run -p 8081:8081 bufferbloat-test
# Run with custom configuration
docker run -p 8081:8081 -e MAX_DOWNLOAD_MBPS=100 -e MAX_UPLOAD_MBPS=50 bufferbloat-testOpen your browser to: http://localhost:8081
Configure the server using environment variables:
# Server settings
LISTEN_PORT=8081 # Port to listen on
PUBLIC_URL=http://localhost:8081 # Public URL for the service
# Bandwidth limiting (optional)
MAX_DOWNLOAD_MBPS=100 # Limit download test speed
MAX_UPLOAD_MBPS=50 # Limit upload test speed
# Test parameters (optional)
DEFAULT_TEST_DURATION=30 # Default test duration in seconds
DEFAULT_PACKET_SIZE=1024 # Default packet size in bytes
DEFAULT_PACKET_RATE=100 # Default packet rate per second# Simulate a 100/50 Mbps connection
MAX_DOWNLOAD_MBPS=100 MAX_UPLOAD_MBPS=50 npm start| Grade | Description | Characteristics |
|---|---|---|
| A+ | Excellent | < 3ms jitter, < 10ms latency increase |
| A | Very Good | < 8ms jitter, < 25ms latency increase |
| B+ | Good+ | < 15ms jitter, < 50ms latency increase |
| B | Good | < 25ms jitter, < 100ms latency increase |
| C | Fair | < 40ms jitter, < 200ms latency increase |
| D | Poor | < 80ms jitter, < 500ms latency increase |
| F | Failed | Severe bufferbloat or test failure |
Jitter - Latency variation during the test
- Lower is better (< 5ms is excellent)
- High jitter indicates unstable connections
Latency Increase - How much latency rises under load
- Lower is better (< 20ms is excellent)
- High increase indicates bufferbloat
Bufferbloat Severity - Overall impact assessment
- Minimal, Low, Moderate, High, Severe
๐ค Upload: A+ (95/100)
- Jitter: 2.1ms
- Latency Increase: 8.3ms
- Bufferbloat: Minimal
๐ฅ Download: A (87/100)
- Jitter: 4.7ms
- Latency Increase: 15.2ms
- Bufferbloat: Low
GET /api/config # Get server configuration
GET /api/download/:size # Download speed test
POST /api/upload # Upload speed test
GET /api/ping # Latency measurement
POST /api/load-chunk # Load generation
GET /api/health # Health check
ping/pong # Real-time latency measurement
start-bufferbloat-test # Begin bufferbloat testing
load-data/load-response # Load generation with timing
test-complete # Test completion notification
- Speed Tests - Establish baseline bandwidth capabilities
- Baseline Latency - Measure unloaded network performance
- Load Generation - Create realistic traffic patterns
- Under-Load Measurement - Monitor latency during saturation
- WebSocket - Low-latency real-time measurement
- HTTP - Reliable fallback for congested networks
- Auto-switching - Uses HTTP when WebSocket is blocked
- Localhost Detection - Reduced load for local testing
- Adaptive Parameters - Chunk sizes and intervals adjust automatically
- Quality Validation - Ensures sufficient samples for reliability
"Only 1 ping sample" / F grades with good network
- The upload load is too aggressive
- Try the HTTP-based upload test function
- Reduce chunk sizes for localhost testing
"No latency measurements received"
- Check firewall settings for WebSocket connections
- Verify server is accessible on the configured port
- Try browser developer tools to check for errors
Tests timing out
- Increase timeout values in server configuration
- Check for network connectivity issues
- Reduce test duration for slower connections
Inconsistent results
- Run multiple tests to average results
- Check for background network activity
- Ensure stable network conditions during testing
Enable verbose logging by opening browser developer console:
// View detailed test progress
console.log(testResults);
// Monitor network requests
// Check Network tab in DevTools// Template for new test functions
async function runCustomTest(parameters) {
return new Promise((resolve) => {
// Test implementation
resolve({
avgLatency: 0,
pingCount: 0,
jitter: 0,
dataQuality: 'good'
});
});
}Modify the calculateGrade() function in index.html to adjust:
- Jitter thresholds
- Latency increase thresholds
- Grade boundaries
- Data quality requirements
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the work of Jim Gettys and others on bufferbloat research
- Built with modern web standards for accurate network measurement
- Thanks to the open source community for networking tools and libraries
Ready to test your network quality? ๐
Run the test now โ