Skip to content
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

feat(transparent-proxy): handle option to drop invalid packets #10676

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bartsmykla
Copy link
Contributor

Caution

This is WORK IN PROGRESS

This commit adds the ability to configure our transparent proxy to drop packets in invalid states, improving application stability by preventing
them from reaching the backend. This is particularly beneficial during
high-throughput requests where out-of-order packets might bypass DNAT.

  • New flag: --drop-invalid-packets allows enabling this behavior during installation.
  • New annotation: traffic.kuma.io/drop-invalid-packets allows configuration via deployments (including Kubernetes init containers and CNI).

Note: Enabling this option may introduce slight performance overhead. Weigh the trade-off between connection stability and performance before enabling it.

See also: https://kubernetes.io/blog/2019/03/29/kube-proxy-subtleties-debugging-an-intermittent-connection-reset/

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues
    • There are no relevant issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS
    • It won't
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md?
    • WIP
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label)
    • There is no need

This commit adds the ability to configure our transparent proxy to drop
packets in invalid states, improving application stability by preventing
 them from reaching the backend. This is particularly beneficial during
high-throughput requests where out-of-order packets might bypass DNAT.

- New flag: --drop-invalid-packets allows enabling this behavior during
  installation.
- New annotation: traffic.kuma.io/drop-invalid-packets allows
  configuration via deployments (including Kubernetes init containers
  and CNI).

Note: Enabling this option may introduce slight performance overhead.
Weigh the trade-off between connection stability and performance before
enabling it.

See also: https://kubernetes.io/blog/2019/03/29/kube-proxy-subtleties-debugging-an-intermittent-connection-reset/

Signed-off-by: Bart Smykla <[email protected]>
@bartsmykla bartsmykla force-pushed the feat/add-ability-to-configure-tproxy-to-drop-invalid-packets branch from 6f9c712 to 8cd132b Compare June 30, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant