Skip to content

fix(pipeline): soften idle keepalive backoff#1325

Closed
yyoyoian-pixel wants to merge 3 commits into
therealaleph:mainfrom
yyoyoian-pixel:fix/idle-keepalive-backoff
Closed

fix(pipeline): soften idle keepalive backoff#1325
yyoyoian-pixel wants to merge 3 commits into
therealaleph:mainfrom
yyoyoian-pixel:fix/idle-keepalive-backoff

Conversation

@yyoyoian-pixel
Copy link
Copy Markdown
Contributor

Summary

  • Raise full-stop polling threshold from idle_tier > 1 (2 empties) to idle_tier > 4 (5 empties) — the tunnel was going silent too fast, starving server-initiated data
  • Any server response (regardless of size) now fully resets idle_tier to 0 — previously small payloads (<1KB) barely recovered idle state
  • Preserve all_legacy gate from fix(pipeline): stop idle keepalive polls, reduce idle requests #1322 so mixed fleets keep polling for long-poll peers

Test plan

  • Connect VPN on Pixel 6 Pro, browse normally — verify no sluggishness
  • Leave VPN idle ~30s, then open an app — verify push notifications / data arrives promptly
  • Monitor relay logs for poll frequency during idle — should see 4s/10s gaps before full-stop, not immediate silence

🤖 Generated with Claude Code

yyoyoian-pixel and others added 3 commits May 20, 2026 14:54
Previous cap of 2s caused ~1200 requests/5min idle with 15 deployments.
New escalation: 20ms→80ms→200ms→500ms→2s→5s→10s→20s.
After 15+ consecutive empties, sessions poll every 20s.

Estimated idle reduction: ~1200/5min → ~200/5min.
Zero latency impact on active traffic — select! races timer against
client reads, so real data fires immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mpties

The previous idle_tier > 1 threshold stopped polling after just 2 empty
responses, starving server-initiated data (push notifications, responses)
until the client happened to send something. This widens the ramp so the
tunnel keeps polling through early idle tiers and only goes full-stop
after 5 consecutive empties. Any server response now fully resets idle
state instead of barely recovering on small payloads.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the type: fix fix: PR — auto-applied by release-drafter label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix fix: PR — auto-applied by release-drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants