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

Linearize UDP packet filtering #7081

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

adriansmares
Copy link
Contributor

Summary

Fixes https://the-things-industries.sentry.io/issues/5353455597

This PR makes the filtering of packets to be 'linear' for the same source address. This means that different source addresses are evaluated in parallel, but individual addresses (so gateways) are evaluated serially.

Changes

  • Make the packet filtering linear for individual gateway addresses.
  • Move the firewall filtering next to the rate limiting filtering and packet unmarshaling.
  • Remove unused configuration options (which had no real effect after Improve Gateway Server throughput #7077).

Testing

Steps

This change has been tested on staging1 and other environments. As this is mainly technical debt and performance improvements, there are no manual testing steps to be done.

Results

Errors such as Failed to store updated rate limit data for key gs:up:udp:addr:x.x.x.x:y after 10 attempts are no longer encountered.

Regressions

N/A.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@adriansmares adriansmares added performance Something is slow or takes too much CPU/Memory/... scalability This could become a problem at scale labels May 15, 2024
@adriansmares adriansmares added this to the v3.30.2 milestone May 15, 2024
@adriansmares adriansmares self-assigned this May 15, 2024
@github-actions github-actions bot added c/gateway server This is related to the Gateway Server compat/config This could affect Configuration compatibility labels May 15, 2024
@adriansmares adriansmares force-pushed the feature/linearize-filtering branch 2 times, most recently from b4a518c to be6c2e7 Compare May 15, 2024 15:16
@adriansmares adriansmares marked this pull request as ready for review May 15, 2024 15:31
@adriansmares adriansmares requested a review from a team as a code owner May 15, 2024 15:31
@adriansmares adriansmares requested a review from KrishnaIyer May 15, 2024 15:31
@adriansmares adriansmares force-pushed the feature/linearize-filtering branch from be6c2e7 to a992488 Compare May 16, 2024 12:49
@adriansmares adriansmares merged commit 0253699 into v3.30 May 16, 2024
13 checks passed
@adriansmares adriansmares deleted the feature/linearize-filtering branch May 16, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/gateway server This is related to the Gateway Server compat/config This could affect Configuration compatibility performance Something is slow or takes too much CPU/Memory/... scalability This could become a problem at scale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants