-
Notifications
You must be signed in to change notification settings - Fork 239
feat(packetparser): Only report important packets #1665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4384e47
to
e6e6161
Compare
e6e6161
to
5d502a9
Compare
Signed-off-by: Matthew McKeen <matthew.mckeen@fastly.com>
5d502a9
to
11be8f2
Compare
@mmckeen sorry for the delay, I just got back from a break. I’ve gone through your proposed change a couple of times, and it looks solid to me. In fact, it addresses something we initially overlooked when conntrack was introduced. First, a few points to make sure we're aligned:
That’s correct. For any given packet, we currently:
In a typical TCP connection, the reported events would likely look like: As a result, we ignore all packets during those 30-second windows, which skews the reported packet, byte, and TCP flag counts from the actual values. That said:
Could you clarify this part? From what I see, conntrack already behaves this way today — so I’m not sure this change introduces new behavior?
This is great — it addresses the gap I mentioned earlier around ignored packets. So in that sense, this feels more like a bug fix than a new feature 🙂 |
I think it's a bit of both a bug fix and a new feature. This will also always report packets if we hit important flags like But yes, I think overall this is more a bug fix and that is just a minor change to reflect expected functionality that the 30 second reporting window is respected for connections without new flags. |
Description
Previously
packetparser
inhigh
dataAggregationLevel
would report (mostly) every single packet since important flags were observed over the lifetime of the connection.This changes that behavior to only observe the important flags on individual packets and report when necessary.
This will mean less packets are reported. However, it also adds back weighting for bytes, packets, and TCP flags so that metrics remain accurate versus before.
I also noticed the current docs for the TCP flags metrics are inaccurate, we only report a subset of the supported flags. Not sure if this is intentional, however supporting more flags will put more memory pressure on both conntrack as well as performance pressure on packet reporting. With sampling in place, this should be more than worth it but there may be repercussions for the performance of
low
dataAggregationLevel
.Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
eBPF objects compile and load as expected.
main
BranchThis Branch
Additional Notes
#1628 will be a follow-up to this to add additional sampling functionality.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.