Skip to content

Fix post-rekey jitter spikes from drain-window frames - #12

Merged
jmcorgan merged 1 commit into
masterfrom
fix/issue10-jitter-spike
Mar 16, 2026
Merged

Fix post-rekey jitter spikes from drain-window frames#12
jmcorgan merged 1 commit into
masterfrom
fix/issue10-jitter-spike

Conversation

@jmcorgan

Copy link
Copy Markdown
Owner

Summary

  • Add time-based grace period (15s = drain window + 5s margin) to suppress jitter updates after rekey cutover
  • Prevents old-session frames arriving via the drain window from producing 2,000–7,000ms jitter spikes
  • Baselines still update every frame so jitter calculation resumes cleanly after grace expires

Fixes #10

@jmcorgan jmcorgan left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Ah, this needs a changelog entry.

After rekey cutover, frames encrypted with the old session can still
arrive during the 10s drain window. These carry large sender timestamps
from the old session, producing enormous transit deltas that spike the
EWMA jitter estimator (observed 2,000-7,000ms spikes on UDP links).

Add a time-based grace period (DRAIN_WINDOW_SECS + 5s = 15s) after
rekey that suppresses jitter updates until drain-window frames have
flushed. Baselines still update every frame so calculation resumes
cleanly after grace expires.

Fixes #10
@jmcorgan
jmcorgan force-pushed the fix/issue10-jitter-spike branch from 4f82202 to 0f24333 Compare March 16, 2026 12:42
@jmcorgan
jmcorgan merged commit 0f24333 into master Mar 16, 2026
57 of 58 checks passed
@jmcorgan
jmcorgan deleted the fix/issue10-jitter-spike branch March 16, 2026 13:00
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.

Post-rekey jitter spikes from drain-window frames

1 participant