GitHub 429 error handling in StackBlitz sync: choosing the retry strategy
0 reputation · 25 Sept 2020, 07:33 UTC
Background
StackBlitz’s GitHub integration pushes local edits to the GitHub API and pulls remote commits. When the API returns a 429 response, the sync service must decide how to retry. The current implementation has not yet chosen between an exponential backoff with jitter or a fixed retry interval, leaving the retry policy unresolved.
Constraints
Free‑tier accounts are subject to stricter GitHub rate limits, and the backend connection‑pool can become exhausted under heavy concurrent editing. A poorly chosen retry policy can exacerbate latency, trigger 502 errors, or silently overwrite changes due to the existing “last write wins” conflict resolution.
Unresolved Decision
Which retry strategy best balances prompt sync, API stability, and minimal connection‑pool strain during peak usage?
Questions
1. How would an exponential backoff with jitter affect sync latency compared to a fixed retry interval under high concurrency?
2. Would a fixed interval reduce the likelihood of connection‑pool exhaustion during simultaneous edits?
3. How can the retry policy be tuned to avoid silent overwrites while respecting GitHub’s rate‑limit guidelines?