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(s2n-quic): Lazy-init duplicate filter #2345

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

Mark-Simulacrum
Copy link
Collaborator

Resolved issues:

n/a

Description of changes:

This avoids a 1MB allocation per endpoint if we never receive a valid token (as is typical, since users need to explicitly opt-in to this with a limiter impl).

Call-outs:

This moves a creation-time allocation to be late (on receipt of valid token). Since we only do this after successful validation I don't think there are any strong concerns from this, but it does likely mean it's possible to distinguish whether an endpoint transitions from "using the filter" to "not using the filter" by measuring network latencies. This seems largely harmless though.

Testing:

No meaningful testing. Just lazy init though.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This avoids a 1MB allocation per endpoint if we never receive a valid
token (as is typical, since users need to explicitly opt-in to this with
a limiter impl).
@camshaft camshaft changed the title Lazy-init duplicate filter feat(s2n-quic): Lazy-init duplicate filter Oct 8, 2024
Copy link
Contributor

@camshaft camshaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@camshaft camshaft merged commit 6b872aa into aws:main Oct 8, 2024
117 of 119 checks passed
@Mark-Simulacrum Mark-Simulacrum deleted the lazy-key branch October 9, 2024 00:44
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.

2 participants