You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(packetparser): Fix under reporting of TCP flags and packet metrics, improve scalability (#1665)
# Description
Previously `packetparser` in `high` `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
- [X] I have read the [contributing
documentation](https://retina.sh/docs/Contributing/overview).
- [X] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [X] I have correctly attributed the author(s) of the code.
- [X] I have tested the changes locally.
- [X] I have followed the project's style guidelines.
- [X] I have updated the documentation, if necessary.
- [X] I have added tests, if applicable.
## Screenshots (if applicable) or Testing Completed
eBPF objects compile and load as expected.
# `main` Branch
<img width="1463" alt="tcpflags main"
src="https://github.com/user-attachments/assets/167908f0-7c37-4498-a7f6-20a41110d925"
/>
<img width="1463" alt="prometheus packets retina main"
src="https://github.com/user-attachments/assets/de8ad834-ed91-4673-8643-aa9cc51b3451"
/>
<img width="1463" alt="prometheus bytes retina main"
src="https://github.com/user-attachments/assets/420f54dc-fbbe-4a7b-a290-24c5d6666518"
/>
# This Branch
<img width="1463" alt="tcpflags patched"
src="https://github.com/user-attachments/assets/88460ee0-f769-4992-b9be-392b38a64b19"
/>
<img width="1463" alt="prometheus packets retina patched"
src="https://github.com/user-attachments/assets/304bbb97-8c57-477f-9c19-91bb1510b9c7"
/>
<img width="1463" alt="prometheus bytes retina patched"
src="https://github.com/user-attachments/assets/ef917562-487e-45be-8fbb-c9573fa708c1"
/>
## Additional Notes
#1628 will be a follow-up to
this to add additional sampling functionality.
---
Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
Signed-off-by: Matthew McKeen <matthew.mckeen@fastly.com>
0 commit comments