IPFIX flow selection (IE 390 and the 391-399 family) is not modelled at all
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with IpfixRawFlow, SelectorReport, and the shipped ipfix-information-elements.xml, then review #581, #584, and #594 to understand the existing packet-selection model and provenance decisions. Resolve whether flow-selection data belongs in samplingInterval or a separate field, how ratios should be derived, and how packet and flow selection compose; done requires an agreed design and evidence from a conformant exporter before implementation.
Written by the indexing model from the issue text.
Description
riptide models packet selection and not flow selection. #594 established the packet-selection path properly — IE 302 selectorId on the record, RFC 5476 §6.5.2 Selector Reports in options records, IE 304 selectorAlgorithm and its parameters. The flow-selection family one layer up is bound nowhere.
None of IE 390-399 appears on IpfixRawFlow:
390 flowSelectorAlgorithm 394 selectorIDTotalFlowsObserved
391 flowSelectedOctetDeltaCount 395 selectorIDTotalFlowsSelected
392 flowSelectedPacketDeltaCount 396 samplingFlowInterval
393 flowSelectedFlowDeltaCount 397 samplingFlowSpacing
398 flowSamplingTimeInterval
399 flowSamplingTimeSpacing
An exporter running an Intermediate Flow Selection Process therefore reports its flows at whatever rate its packet selection states, or at 1, with no signal that most of its flows were discarded before export.
This is not a hypothetical gap, it is a regression the code used to paper over
Before #594, fromSelectorAlgorithm() read samplingFlowInterval (396), samplingFlowSpacing (397), flowSamplingTimeInterval (398) and flowSamplingTimeSpacing (399) — the flow-selection family — while switching on IE 304, which is packet selection. The two never appear together in a conformant export, so those lookups always missed and the branch fabricated a rate from its defaults. #594 removed the conflation.
The result is that riptide now reads the flow-selection elements correctly, which is to say not at all. That is an improvement over reading them under the wrong algorithm, and it leaves a real capability unimplemented.
The registry exists locally, unlike the one #584 was missing
The shipped ipfix-information-elements.xml does carry ipfix-flowselectoralgorithm, with the same ten values as the packet registry:
0 Unassigned 5 Property Match Filtering
1 Systematic count-based Sampling 6 Hash-based Filtering using BOB
2 Systematic time-based Sampling 7 Hash-based Filtering using IPSX
3 Random n-out-of-N Sampling 8 Hash-based Filtering using CRC
4 Uniform probabilistic Sampling 9 Flow-state Dependent
This is the opposite of the situation in #584, where IE 304's registry was absent from the file and both hand-written switches had drifted. Here SelectorReport's existing partition — which algorithms express a ratio and which do not — transfers directly, because the value sets are identical.
What makes this genuinely different from packet selection
Not just "the same thing one layer up". Three things change:
The counters are exact, and the records are missing. Under packet sampling a surviving flow record undercounts its own bytes. Under flow selection a surviving record's counters are correct and whole flows are simply absent. Multiplying by the ratio gives an unbiased estimate of aggregate volume either way, but a per-flow question — top talkers, whether host X spoke to host Y — cannot be answered at all for the discarded flows, and no multiplier repairs that.
The two compose. An exporter can sample packets and select flows. The true correction is the product of both ratios, and riptide has one samplingInterval column. Modelling only one silently drops the other.
The exporter can tell us directly. IEs 394 and 395 (selectorIDTotalFlowsObserved / Selected) are an observed ratio rather than a configured one, which is a stronger signal than any parameter-derived figure. 391-393 give the selected counters explicitly. Neither has an analogue in the packet-selection path.
Open questions
- Should
samplingIntervalcarry the product of packet and flow selection, or should flow selection get its own column? One column is simpler and loses the ability to say which process discarded what. - Should a flow-selection ratio be derived from parameters (396-399), or measured from 394/395 where the exporter states both? The measured ratio is better evidence, and the provenance vocabulary has no value that distinguishes it.
- Does
derivedcover a rate computed from a flow selector, or does that need its own provenance? See #581, which is already asking a related question about carrying provenance into the rollups. - Is there a conformant exporter to test against? #584's survey found no collector reading these and no open-source exporter writing them. Same evidence problem, and the same reason not to build it speculatively.
Recommendation
File and leave. No exporter on the reference fleet uses flow selection, and #584's survey found nobody implementing the flow-selection family at all — not nfdump, Akvorado, goflow2, vflow or pmacct. Building it now means a second round of writing an unverifiable implementation from an RFC, which is exactly how #584's four defects got there.
Worth doing when an exporter turns up that sends IE 390. Worth reading now only for question 1, which affects how samplingInterval should be understood and therefore touches #581.
Split off from #584, which shipped the packet-selection half in #594. Related: #467, #581, #585.
- Dominant language
- Java
- Stars
- 2
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 52
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Riptide-Labs/riptide
-
enhancement priority: low
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Riptide-Labs/riptide#1060 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Riptide-Labs/riptide#1059 ·
Maintainers usually reply within 1 day
-
dependencies javascript priority: low
Difficulty 1/5 Under an hour Newbie friendliness 15/100
Riptide-Labs/riptide#1045 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 22/100
Riptide-Labs/riptide#987 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 5/5 Over a week Newbie friendliness 25/100
Riptide-Labs/riptide#983 ·
Maintainers usually reply within 1 day
All issues in Riptide-Labs/riptide
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Julow/Unexpected-Keyboard#1490 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Vakore/ZappierGames#275 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
unitycatalog/unitycatalog#2148 ·
Maintainers usually reply within 2 days
-
bug key bindings source editor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement good first issue Integration
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SasanLabs/VulnerableApp#903 · 1 comment ·
Maintainers usually reply within 1 day