Skip to content

Jittered retry backoff + more retries for shared-key workshops#108

Merged
jheller1212 merged 1 commit into
mainfrom
feat/jittered-retry-backoff
Jun 24, 2026
Merged

Jittered retry backoff + more retries for shared-key workshops#108
jheller1212 merged 1 commit into
mainfrom
feat/jittered-retry-backoff

Conversation

@jheller1212

Copy link
Copy Markdown
Owner

Problem: ~30 participants on one shared key. Old backoff = fixed 5s/15s delays, 2 retries. A synchronized start (instructor says 'go') → all hit 429 → all retry on the same beat → thundering herd that re-triggers the limit, and 2 retries isn't enough to ride out a sustained spike.

Fix:

  • Jitter every wait: fallback delays spread across 50–100% of base; Retry-After honored fully + 0–2s on top. Concurrent clients now fan out instead of retrying in lockstep.
  • 5 attempts (was 3) with a longer ramp [2s, 6s, 15s, 30s] so transient bursts self-heal rather than surfacing an error.

Note: this absorbs bursts — it does not raise the provider's hard per-key limit. See operational guidance (key tier + fast model). Tests 8/8 ✓, build ✓.

Workshops run ~30 participants on a single shared key. The old backoff
used fixed delays (5s, 15s) with only 2 retries, so a synchronized burst
(everyone clicks Start together) hit 429 and all retried on the same
beat — a thundering herd that re-triggered the limit. Add jitter to both
fallback and Retry-After waits so concurrent clients fan out, and raise
to 5 attempts (4 retries) to ride out transient spikes instead of erroring.
@jheller1212
jheller1212 merged commit c10fcd8 into main Jun 24, 2026
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for ai2aichat ready!

Name Link
🔨 Latest commit f0a1832
🔍 Latest deploy log https://app.netlify.com/projects/ai2aichat/deploys/6a3c25707b458f00088d9e40
😎 Deploy Preview https://deploy-preview-108--ai2aichat.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96
Accessibility: 97
Best Practices: 100
SEO: 100
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant