A distributed network performance testing platform that coordinates iperf3 tests across multiple agents via a central Manager with a modern web interface.
+------------------+ HTTPS +-----------------+
| AGENT(S) | <----------------------> | MANAGER |
| - register | /v1/agent/... | FastAPI + DB |
| - heartbeat | pull tasks / push results | (SQLite dev) |
| - claim & exec | | |
+------------------+ +-----------------+
^ ^
| +---------------+-------------+
| | WEB UI (Vue+Tailwind) |
| | - Agents / Exercises / |
| | Tests / Tasks / Results |
| +-----------------------------+
- Distributed Testing: Coordinate iperf3 tests across multiple agents
- Port Management: Automatic port reservation to prevent conflicts
- Real-time Monitoring: Live status updates and task tracking
- Modern UI: Vue 3 + Tailwind CSS web interface
- Agent Management: Register, monitor, and manage test agents
- Exercise Orchestration: Create and manage multi-test scenarios
- Results Analysis: Parse and visualize iperf3 JSON results
- Python 3.11+
- Node.js 18+
- iperf3 installed on agent machines
-
Clone the repository
git clone https://github.com/jbhoorasingh/iperf-orchestrator cd iperf-orchestrator -
Backend Setup
cd backend poetry install # Copy environment file cp env.example .env # Edit .env with your settings # Run database migrations poetry alembic upgrade head # Start the backend poetry run uvicorn app.main:app --reload
-
Frontend Setup
cd frontend npm install npm run dev -
Agent Setup
cd agent poetry install # Copy environment file cp env.example .env # Edit .env with manager URL and agent credentials # Run the agent - arguements override .env poetry run python agent.py --manager-url http://localhost:8000 --agent-name agent1 --agent-key secret-key-123 --api-version 1
-
Start the full stack
cd backend docker-compose up -d -
Access the application
- Manager API: http://localhost:8000
- Web UI: http://localhost:3000
- Default login: admin / admin123
First, create agent records in the Manager:
curl -X POST http://localhost:8000/v1/agents \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "agent1",
"registration_key": "secret-key-123",
"operating_system": "linux"
}'On each agent machine, run the agent script:
export MANAGER_URL=http://manager-ip:8000
export AGENT_NAME=agent1
export AGENT_KEY=secret-key-123
python agent.pyUse the web UI or API to create an exercise:
curl -X POST http://localhost:8000/v1/exercises \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Network Test 1",
"duration_seconds": 30,
"notes": "Testing network performance"
}'Add tests to the exercise:
curl -X POST http://localhost:8000/v1/exercises/1/tests \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"server_agent_id": 1,
"client_agent_id": 2,
"server_port": 5200,
"udp": false,
"parallel": 16,
"time_seconds": 30
}'curl -X POST http://localhost:8000/v1/exercises/1/start \
-H "Authorization: Bearer <token>"All admin endpoints require a Bearer token:
# Login to get token
curl -X POST http://localhost:8000/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "admin123"}'Agent endpoints require special headers:
curl -X POST http://localhost:8000/v1/agent/heartbeat \
-H "X-AGENT-NAME: agent1" \
-H "X-AGENT-KEY: secret-key-123" \
-H "X-API-Version: 1" \
-H "Content-Type: application/json" \
-d '{"ip_address": "10.0.0.1", "running": []}'Environment variables for the Manager:
DATABASE_URL=sqlite:///./iperf_orchestrator.db
SECRET_KEY=your-secret-key-here
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin123
API_VERSION=1Environment variables for agents:
MANAGER_URL=http://localhost:8000
AGENT_NAME=agent1
AGENT_KEY=your-registration-key-here
API_VERSION=1Use the provided cloud-init configuration for automated agent deployment:
#cloud-config
# See deployment/cloud-init.yaml for full configurationInstall as systemd services for production:
# Copy service files
sudo cp deployment/iperf-agent.service /etc/systemd/system/
sudo cp deployment/manager-systemd.service /etc/systemd/system/
# Enable and start services
sudo systemctl enable iperf-agent
sudo systemctl start iperf-agent# Build and run with Docker Compose
docker-compose -f docker-compose.prod.yml up -dPOST /v1/agents- Create agentGET /v1/agents- List agentsGET /v1/agents/{id}- Get agent detailsDELETE /v1/agents/{id}- Delete agentPOST /v1/exercises- Create exerciseGET /v1/exercises- List exercisesPOST /v1/exercises/{id}/tests- Add test to exercisePOST /v1/exercises/{id}/start- Start exercisePOST /v1/exercises/{id}/stop- Stop exerciseGET /v1/exercises/{id}/results- Get exercise resultsGET /v1/tasks- List tasksPOST /v1/tasks/{id}/cancel- Cancel task
POST /v1/agent/register- Register agentPOST /v1/agent/heartbeat- Send heartbeatPOST /v1/agent/tasks/claim- Claim taskPOST /v1/agent/tasks/{id}/started- Mark task startedPOST /v1/agent/tasks/{id}/result- Submit task result
cd backend
pytest tests/# Backend
cd backend
black app/
isort app/
# Frontend
cd frontend
npm run formatcd backend
# Create migration
alembic revision --autogenerate -m "Description"
# Apply migrations
alembic upgrade head
# Rollback
alembic downgrade -1-
Agent can't connect to Manager
- Check MANAGER_URL is correct
- Verify network connectivity
- Check firewall settings
-
Port conflicts
- Manager automatically prevents port conflicts
- Check port reservations in UI
-
Tasks not executing
- Verify agent is online (heartbeat < 15s)
- Check agent logs for errors
- Verify iperf3 is installed on agent
- Manager logs: Check application logs
- Agent logs: JSONL format to stdout
- System logs:
journalctl -u iperf-agent
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details.