Overview
Design and implement multi-target support to enable Trafficinator to generate load against multiple Matomo instances simultaneously with independent configuration per target.
Problem Statement
Currently, Trafficinator can only target a single Matomo instance at a time. Users who manage multiple Matomo deployments (e.g., dev/staging/prod environments, different clients, regional instances) must run separate containers with different configurations.
Proposed Solution
Enable multi-target configuration where users can define multiple Matomo endpoints with:
- Independent authentication tokens
- Per-target visit weights/distribution
- Per-target daily caps
- Shared or per-target URL/event/funnel configs
Acceptance Criteria
Backend/Config Model
Loader Implementation
API/Control UI
Testing & Documentation
Open Design Questions
- Config structure: Array of targets vs. nested object with target IDs?
- Weight distribution: Percentage-based or ratio-based?
- Shared vs. per-target: Should URLs/events/funnels be global or per-target?
- Backward compatibility: Auto-migrate existing single-target configs or require manual conversion?
- Status reporting: How to surface per-target success rates and errors in UI?
Example Use Cases
Use Case 1: Multi-Environment Testing
targets:
- name: "Development"
url: "https://dev.analytics.example.com/matomo.php"
site_id: 1
weight: 20
visits_per_day: 1000
- name: "Staging"
url: "https://staging.analytics.example.com/matomo.php"
site_id: 1
weight: 30
visits_per_day: 5000
- name: "Production"
url: "https://analytics.example.com/matomo.php"
site_id: 1
weight: 50
visits_per_day: 20000
Use Case 2: Multi-Client Load Generation
targets:
- name: "Client A"
url: "https://client-a.matomocloud.com/matomo.php"
site_id: 1
token_auth: "xxx"
timezone: "America/New_York"
visits_per_day: 10000
- name: "Client B"
url: "https://client-b.matomocloud.com/matomo.php"
site_id: 2
token_auth: "yyy"
timezone: "Europe/London"
visits_per_day: 15000
Related Items
- Depends on: None (can be implemented independently)
- Blocks: P-009 (advanced reporting could show per-target metrics)
- Related to: P-006 (journey realism works with multi-target)
Estimated Effort
8 hours (as per backlog P-008)
- Config/models: 2h
- Loader logic: 3h
- UI/API: 2h
- Testing/docs: 1h
Priority
Medium - Nice to have but not blocking current features. Useful for larger deployments and testing scenarios.
Labels
enhancement, planning, architecture, p-008
Overview
Design and implement multi-target support to enable Trafficinator to generate load against multiple Matomo instances simultaneously with independent configuration per target.
Problem Statement
Currently, Trafficinator can only target a single Matomo instance at a time. Users who manage multiple Matomo deployments (e.g., dev/staging/prod environments, different clients, regional instances) must run separate containers with different configurations.
Proposed Solution
Enable multi-target configuration where users can define multiple Matomo endpoints with:
Acceptance Criteria
Backend/Config Model
Loader Implementation
API/Control UI
/api/targetsCRUD endpoints for managing targetsTesting & Documentation
Open Design Questions
Example Use Cases
Use Case 1: Multi-Environment Testing
Use Case 2: Multi-Client Load Generation
Related Items
Estimated Effort
8 hours (as per backlog P-008)
Priority
Medium - Nice to have but not blocking current features. Useful for larger deployments and testing scenarios.
Labels
enhancement,planning,architecture,p-008