SES Simple SpeedTest Web App
The Intelsat Simple SpeedTest Web App is a lightweight, containerized application designed to measure network performance. It provides users with detailed insights into their network's download speed, upload speed, latency, and jitter, making it an ideal tool for network diagnostics and optimization.
Current Version
Version 1.3.3 is the latest version .
Why is XHR Important for Speed Tests?
Speed tests leverage XHR to simulate real-world network behavior, such as :
Concurrent downloads (e.g., using multiple XHR connections).
Measuring latency (time taken for the server to respond).
Measuring bandwidth (amount of data transferred per second).
By adjusting the number of XHR connections, you can control :
How much stress is placed on the network.
How closely the test resembles a user’s real-world browsing or downloading experience.
Features
Speed Test Interface :
Measures download and upload speeds with graphical meters.
Provides latency and jitter measurements for enhanced network analysis.
Error margin display for better precision in results.
Server Name Configuration :
Easily customizable server name display.
Changes are stored centrally, allowing persistence across devices.
Data Storage and Reporting :
Option to store test results and download reports in JSON format.
Includes details like timestamp, IP address, server name, and performance metrics.
Integration with Monitoring Tools :
Built-in access to a monitoring app (Monit) for managing server processes like Apache and Iperf3.
Supports Iperf3 Testing :
CLI-compatible for advanced TCP/UDP testing.
Dockerized Deployment
This application runs in a Docker container for easy deployment and scalability. Here's the configuration:
Note : You can change the port mapping based on your needs.
Docker Run Command
docker run -itd --name ispeed --restart unless-stopped -p 8000:80 -p 5812:5812 -p 5100:5100/udp -p 5100:5100/tcp rubenc2/ispeed:latest
Copy
Docker Compose
docker_compose.yml
version: '3.8'
# Intelsat Simple SpeedTest Web App
# This configuration sets up the SpeedTest service, Monit, and iperf3 for testing purposes.
services:
ispeed:
image: rubenc2/ispeed:latest
container_name: ispeed
restart: unless-stopped
ports:
- "8000:80" # Main SpeedTest app <ip_address:8000>
- "5812:5812" # Monit app <ip_address:5812>: admin/Intelsat123. Control apache2 and iperf3.
- "5100:5100/udp" # iperf3 UDP. CLI Command.
- "5100:5100/tcp" # iperf3 TCP. CLI Command.
stdin_open: true
tty: true
Copy
Usage Instructions
Accessing the App:
Open a web browser and navigate to http://<server_ip>:8000.
Running Tests:
Click the Start button to perform speed tests.
View results in real-time, including download/upload speeds and latency.
Setting the Server Name:
Click the Server Icon to customize the server name.
Changes persist across sessions and devices.
Generating Reports:
Enable data storage through settings.
Click Create Report to download test results as a JSON file.
Accessing Monit:
Navigate to http://<server_ip>:5812 for advanced server monitoring.
Default credentials: admin / Intelsat123.
Using Iperf3:
Run UDP or TCP tests using the configured ports (5100).
Using iperf3 for Bandwidth Testing
Command :
iperf3 -c <server_ip> -p 5100
Copy
Description :
Runs a TCP bandwidth test from the client to the server on port 5100. TCP is the default protocol used by iperf3.
Command :
iperf3 -c <server_ip> -p 5100 -u -b 10M
Copy
Description :
Runs a UDP bandwidth test to the server on port 5100, targeting a bandwidth of 10 Mbps (-b 10M). Adjust the -b value to set a different target bandwidth.
Command :
iperf3 -c <server_ip> -p 5100 -t 20
Copy
Description :
Runs a test for 20 seconds (-t 20). The default test duration is 10 seconds.
Command :
iperf3 -c <server_ip> -p 5100 -R
Copy
Description :
Performs a reverse test where the server sends data to the client (-R).
Technical Details
Base Image:
Lightweight container using Apache and Iperf3.
Ports:
8000: Web app interface.
5812: Monit for server process control.
5100: Iperf3 for TCP/UDP tests.
Customization:
Server name stored persistently in server_name.txt.
Key Features and How They Work
1. Download Measurement
Purpose: Measures the speed at which data is downloaded from the server to the client.
Mechanism:
Utilizes multiple simultaneous HTTP GET requests to download a pre-configured file (file50MB.txt or dynamically set).
Chunk-based measurement ensures accuracy while managing bandwidth efficiently.
Technology:
Implemented in JavaScript (intelsat_speedtest_worker.js).
Measures raw throughput by timing the data received over the test duration.
2. Upload Measurement
Purpose: Measures the speed at which data is uploaded from the client to the server.
Mechanism:
Sends randomly generated binary data to a lightweight PHP endpoint (empty.php).
Uses multiple HTTP POST streams for robust throughput calculation.
Technology:
Random data chunks are created using JavaScript to simulate actual user-upload patterns.
Results are adjusted with an overhead compensation factor to account for protocol overhead.
3. Latency Measurement
Purpose: Measures the time it takes for a packet to travel from the client to the server and back (Round Trip Time or RTT).
Mechanism:
Sends HTTP GET requests to empty.php and calculates the time difference between the request and response.
Optionally uses the Performance API for higher precision if the browser supports it.
Technology:
The pingTest function in intelsat_speedtest_worker.js performs iterative pings and computes averages for display.
Reports results in milliseconds (ms).
4. Jitter Measurement
Purpose: Measures the variation in latency over a series of pings.
Mechanism:
Calculates the difference between consecutive ping times during the latency test.
Averages the variations over the test duration to determine jitter.
Technology:
Uses JavaScript for real-time jitter computation.
Reported alongside latency in milliseconds (ms).
Additional Features
Dynamic Configuration
The app dynamically adjusts test settings such as:
File size for download tests.
Chunk size for upload tests.
Number of concurrent streams for both upload and download.
Test order (download, upload, ping, jitter) via the test_order setting.
Server Components
getIP.php:
Retrieves the client's IP address.
Optionally fetches ISP and location information using the https://ipinfo.io API.
empty.php:
A lightweight endpoint that responds with HTTP 200 OK for upload and ping tests.
Configured to prevent caching and ensure real-time responses.
garbage.php:
Generates random binary data for download tests.
Outputs data in chunks with configurable size (ckSize parameter) to simulate real-world download conditions.
intelsat_speedtest_worker.js:
Core logic for running and managing speed tests.
Implements multi-threaded testing using Web Workers for accurate and isolated performance measurement.
Technology Stack
Frontend:
HTML5, CSS3, and JavaScript for UI and speed test logic.
Interactive features implemented using DOM manipulation and AJAX.
Backend:
Lightweight PHP scripts (empty.php, garbage.php, and getIP.php) to handle test requests efficiently.
Optimized for speed and low resource usage.
Protocols:
HTTP/HTTPS: Used for file transfers and ping tests.
TCP and UDP: Supported for iperf3 testing if enabled.
Data Handling:
JavaScript processes results in real time.
Results can be stored and downloaded as JSON reports.
Test Workflow
Initialization:
The application fetches the user's IP address and ISP details.
Dynamic configurations like file size and stream count are applied.
Download Test:
Multiple streams are used to download data from the server.
The total downloaded bytes are measured over time to calculate speed.
Upload Test:
Random binary data is generated and uploaded to the server.
The total uploaded bytes are measured over time to calculate speed.
Latency and Jitter Tests:
HTTP GET requests are sent to measure round-trip time (latency).
Variations in round-trip time are calculated to determine jitter.
Results Display:
Real-time results are updated on the UI using canvas elements.
Results can be stored for report generation.
Future Improvements
Enhanced Reporting:
Include charts and visualizations in the JSON report.
Multilingual Support:
Add localized language options for a global audience.
Offline Testing:
Enable tests in isolated networks without external dependencies.
License
This project is licensed under the MIT License.