Skip to content

Commit 9fee045

Browse files
author
root
committed
feat: add flowd-go (SciTags) integration to perfSONAR deployment
Add flowd-go flow-marking daemon as a default (opt-out) step in perfSONAR testpoint and toolkit installation workflows. New files: - perfSONAR-install-flowd-go.sh v1.0.0: helper script to install, configure, and optionally uninstall flowd-go from the CERN SciTags repository. Supports interactive experiment selection and scripted mode (--experiment-id, --yes, --dry-run, --uninstall). - scitags-fireflies.md: documentation on SciTags, fireflies, flowd-go, experiment IDs, and verification steps for perfSONAR operators. Updated scripts: - perfSONAR-orchestrator.sh v1.0.3 -> v1.1.0: new step_flowd_go() between deploy and psconfig steps; --no-flowd-go and --experiment-id flags added. - install_tools_scripts.sh v1.0.5 -> v1.0.6: downloads the new flowd-go helper script. Updated docs: - install-perfsonar-testpoint.md: new Step 8 (flowd-go), old Step 8 renumbered to Step 9. - install-perfsonar-toolkit.md: new Step 10 (flowd-go), old Step 10 renumbered to Step 11. - landing.md: SciTags/flowd-go subsection in Post-Deploy Configuration. - installation.md (legacy): flowd-go recommendation added. - README.md: new script listed in tools table. - mkdocs.yml: nav entry for scitags-fireflies.md. All SHA256 checksums and the scripts.sha256 manifest updated.
1 parent 9c157e7 commit 9fee045

14 files changed

+762
-9
lines changed

docs/perfsonar/installation.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ Until your host is added on https://psconfig.opensciencegrid.org to one or more
9898

9999
* Once installation is finished, please **reboot** the node.
100100

101+
* **SciTags / flowd-go (Recommended):** We recommend installing [flowd-go](https://github.com/scitags/flowd-go) to tag perfSONAR measurement traffic with [SciTags](https://www.scitags.org/) experiment metadata. See [SciTags, Fireflies, and perfSONAR](scitags-fireflies.md) for details. Use the helper script:
102+
103+
```bash
104+
/opt/perfsonar-tp/tools_scripts/perfSONAR-install-flowd-go.sh
105+
```
106+
107+
To skip this step, simply omit it. The modern install guides ([Testpoint](../personas/quick-deploy/install-perfsonar-testpoint.md), [Toolkit](../personas/quick-deploy/install-perfsonar-toolkit.md)) include flowd-go as a default step.
108+
101109
For any further questions, please consult official [Troubleshooting
102110
Guide](http://docs.perfsonar.net/troubleshooting_overview.html), [FAQ](http://docs.perfsonar.net/FAQ.html) as well as
103111
WLCG/OSG specific [FAQ](faq.md) or contact directly WLCG or OSG perfSONAR support units.
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# SciTags, Fireflies, and perfSONAR
2+
3+
## What Are SciTags?
4+
5+
[SciTags](https://www.scitags.org/) is an initiative by the HEP/WLCG networking community to improve
6+
network visibility by **tagging** network flows with metadata that identifies the experiment and activity
7+
generating them. By embedding compact identifiers — an *experiment ID* and an *activity ID* — into every
8+
packet of a tagged flow, network operators, site administrators, and researchers can:
9+
10+
- **Attribute traffic** to specific scientific experiments (ATLAS, CMS, LHCb, ALICE, Belle II, DUNE, etc.).
11+
- **Distinguish activity types** such as production data transfers, analysis jobs, or network measurements.
12+
- **Correlate** network metrics with application-level behavior for faster root-cause analysis.
13+
- **Enable smarter traffic engineering** by providing information that routers, firewalls, and monitoring
14+
systems can act on.
15+
16+
The technical specification is maintained by the
17+
[SciTags Organization](https://www.scitags.org/) and documented in the
18+
[SciTags Technical Specification](https://docs.google.com/document/d/1x9JsZ7iTj44Ta06IHdkwpv5Q2u4U2QGLWnUeN2Zf5ts/edit).
19+
20+
---
21+
22+
## What Are Fireflies?
23+
24+
A **firefly** is a lightweight UDP packet that carries metadata about a network flow. When a tagged
25+
application (or a daemon acting on its behalf) starts or stops a network transfer, it emits a firefly to a
26+
designated collector. Each firefly contains:
27+
28+
| Field | Description |
29+
|-------|-------------|
30+
| **Experiment ID** | Numeric identifier for the experiment or project (e.g. ATLAS = 2, CMS = 3) |
31+
| **Activity ID** | Numeric identifier for the type of activity (e.g. data transfer, network test) |
32+
| **Source IP:port** | Origin of the network flow |
33+
| **Destination IP:port** | Target of the network flow |
34+
| **Protocol** | Transport protocol (TCP, UDP) |
35+
| **State** | Flow state: *start*, *ongoing*, or *end* |
36+
37+
Fireflies serve two complementary purposes:
38+
39+
1. **Flow announcement** — Notify collectors and monitoring infrastructure that a tagged flow exists so it
40+
can be tracked from start to finish.
41+
2. **Packet marking** — On hosts that support it, the same metadata can be encoded into the IPv6 Flow Label
42+
or IPv4 DSCP/TOS field of every packet, enabling in-network identification without deep packet
43+
inspection.
44+
45+
---
46+
47+
## What Is flowd-go?
48+
49+
[**flowd-go**](https://github.com/scitags/flowd-go) is a lightweight, high-performance daemon that
50+
implements the SciTags flow-marking and firefly-sending infrastructure. It is written in Go and ships as a
51+
single statically-linked binary (with embedded eBPF programs for packet marking on Linux ≥ 5.x kernels).
52+
53+
### Key capabilities
54+
55+
| Feature | Details |
56+
|---------|---------|
57+
| **Packet marking** | Uses eBPF to stamp the IPv6 Flow Label on egress packets matching tracked flows |
58+
| **Firefly emission** | Sends UDP fireflies to local or remote collectors when flows start, continue, or end |
59+
| **perfSONAR plugin** | Built-in plugin that marks *all* egress traffic with a configured experiment/activity ID — ideal for dedicated measurement hosts |
60+
| **Low overhead** | Statically compiled Go binary; no Python, no containers, no runtime dependencies beyond `libz` and `libelf` (typically already present) |
61+
| **RPM packaged** | Available from the SciTags repository for EL9 (`x86_64` and `aarch64`) |
62+
63+
### Architecture
64+
65+
flowd-go follows a **plugin → backend** pipeline:
66+
67+
```
68+
┌──────────┐ ┌──────────┐
69+
│ Plugins │──────▶│ Backends │
70+
│ (sources)│ │ (sinks) │
71+
└──────────┘ └──────────┘
72+
```
73+
74+
- **Plugins** detect or receive flow events (API calls, eBPF socket monitoring, perfSONAR catch-all, etc.).
75+
- **Backends** act on those events: mark packets via eBPF, send fireflies, export Prometheus metrics.
76+
77+
For perfSONAR deployments the recommended configuration uses the **perfsonar** plugin (marks all egress
78+
traffic) together with the **marker** backend (eBPF-based IPv6 Flow Label stamping).
79+
80+
---
81+
82+
## Why Use flowd-go with perfSONAR?
83+
84+
perfSONAR measurement hosts generate a significant amount of network traffic for latency, throughput, and
85+
traceroute tests. Without tagging, this traffic is indistinguishable from other flows traversing the same
86+
links. By running flowd-go alongside perfSONAR:
87+
88+
- **Network operators** can instantly identify perfSONAR measurement traffic on their infrastructure.
89+
- **Experiment coordinators** can attribute network test results to specific projects.
90+
- **Troubleshooters** can correlate measurement anomalies with flow-level metadata in packet captures or
91+
NetFlow/sFlow records.
92+
93+
The integration is intentionally lightweight:
94+
95+
1. Install the `flowd-go` RPM (a single package, ~5 MB).
96+
2. Write a small YAML configuration selecting your experiment.
97+
3. Enable and start the `flowd-go` systemd service.
98+
99+
The helper scripts in this repository automate all three steps.
100+
101+
---
102+
103+
## Experiment IDs
104+
105+
The following experiment IDs are defined in the SciTags registry. Select the one that matches your site's
106+
primary experiment affiliation:
107+
108+
| ID | Experiment |
109+
|----|------------|
110+
| 1 | Default (no specific experiment) |
111+
| 2 | ATLAS |
112+
| 3 | CMS |
113+
| 4 | LHCb |
114+
| 5 | ALICE |
115+
| 6 | Belle II |
116+
| 7 | SKA |
117+
| 8 | DUNE |
118+
| 9 | LSST / Rubin Observatory |
119+
| 10 | ILC |
120+
| 11 | Auger |
121+
| 12 | JUNO |
122+
| 13 | NOvA |
123+
| 14 | XENON |
124+
125+
Activity ID **2** (network testing / perfSONAR) is used by default for perfSONAR deployments.
126+
127+
---
128+
129+
## Configuration Reference
130+
131+
A minimal `/etc/flowd-go/conf.yaml` for a perfSONAR host affiliated with ATLAS:
132+
133+
```yaml
134+
plugins:
135+
perfsonar:
136+
activityId: 2
137+
experimentId: 2
138+
139+
backends:
140+
marker:
141+
targetInterfaces: [ens4f0np0, ens4f1np1]
142+
markingStrategy: label
143+
forceHookRemoval: true
144+
```
145+
146+
| Key | Description |
147+
|-----|-------------|
148+
| `plugins.perfsonar.activityId` | Activity type — use **2** for network testing |
149+
| `plugins.perfsonar.experimentId` | Experiment affiliation (see table above) |
150+
| `backends.marker.targetInterfaces` | List of NIC names whose egress traffic should be marked |
151+
| `backends.marker.markingStrategy` | `label` = IPv6 Flow Label (recommended) |
152+
| `backends.marker.forceHookRemoval` | Remove eBPF hooks cleanly on daemon stop |
153+
154+
For the full set of options see the
155+
[flowd-go man page](https://github.com/scitags/flowd-go/blob/main/rpm/flowd-go.1.md) and the
156+
[default conf.yaml](https://github.com/scitags/flowd-go/blob/main/rpm/conf.yaml).
157+
158+
---
159+
160+
## Verifying the Installation
161+
162+
After starting flowd-go, verify it is running and marking traffic:
163+
164+
```bash
165+
# Check service status
166+
systemctl status flowd-go
167+
168+
# View recent log output
169+
journalctl -u flowd-go --no-pager -n 20
170+
171+
# Confirm eBPF programs are attached (should show tc/qdisc entries)
172+
tc qdisc show dev <NIC_NAME>
173+
```
174+
175+
---
176+
177+
## Further Reading
178+
179+
- [SciTags Organization](https://www.scitags.org/)
180+
- [SciTags Technical Specification](https://docs.google.com/document/d/1x9JsZ7iTj44Ta06IHdkwpv5Q2u4U2QGLWnUeN2Zf5ts/edit)
181+
- [flowd-go GitHub Repository](https://github.com/scitags/flowd-go)
182+
- [flowd-go Man Page](https://github.com/scitags/flowd-go/blob/main/rpm/flowd-go.1.md)
183+
- [perfSONAR Documentation](https://docs.perfsonar.net/)

docs/perfsonar/tools_scripts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This directory contains helper scripts for perfSONAR deployment, configuration,
1212
| **perfSONAR-auto-enroll-psconfig.sh** || Automatic pSConfig enrollment | [Installation Guides](../../personas/quick-deploy/landing.md) |
1313
| **install_tools_scripts.sh** || Bulk installer for all scripts | [Installation](#installation) |
1414
| **install-systemd-service.sh** || Container auto-start on boot | [Container Management](#container-management) |
15+
| **perfSONAR-install-flowd-go.sh** | v1.0.0 | SciTags flowd-go installer | [SciTags & Fireflies](../scitags-fireflies.md) |
1516

1617
**Latest Updates**: v1.2.0 (Dec 2025) adds save/restore state management to fasterdata-tuning.sh
1718

docs/perfsonar/tools_scripts/install_tools_scripts.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ set -euo pipefail
55
# Purpose: Ensure the perfSONAR testpoint repository is cloned and the tools_scripts
66
# directory is present under /opt/perfsonar-tp/tools_scripts.
77
#
8+
# Version: 1.0.6 - 2026-02-27
9+
# - Add perfSONAR-install-flowd-go.sh to download list for SciTags/flowd-go integration.
810
# Version: 1.0.5 - 2026-02-26
911
# - Add perfSONAR-diagnostic-report.sh to download list.
1012
# Version: 1.0.4 - 2026-02-26
@@ -16,7 +18,7 @@ set -euo pipefail
1618
# Author: Shawn McKee, University of Michigan
1719
# Acknowledgements: Supported by IRIS-HEP and OSG-LHC
1820

19-
VERSION="1.0.5"
21+
VERSION="1.0.6"
2022
PROG_NAME="$(basename "$0")"
2123

2224
# Check for --version or --help flags
@@ -94,6 +96,7 @@ files=(
9496
perfSONAR-auto-update.sh
9597
perfSONAR-health-monitor.sh
9698
perfSONAR-diagnostic-report.sh
99+
perfSONAR-install-flowd-go.sh
97100
seed_testpoint_host_dirs.sh
98101
update-perfsonar-deployment.sh
99102
perfSONAR-orchestrator.sh
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
320252de3acf96f860a118ae7dc3f74ebe16c256df9cdc43eb301b16de83821e
1+
d8e3cc4a03725c7fb6e12c13e5036e7c6a3af301a1f1e728690ce9ad3ab8aa96 install_tools_scripts.sh

0 commit comments

Comments
 (0)