Skip to content

c0mpute edge: Fibonacci retries, serve the last good copy, 503 page instead of 502 - #33

Merged
ralyodio merged 1 commit into
mainfrom
edge-fib-retry-stale
Nov 9, 2026
Merged

ralyodio merged 1 commit into
mainfrom
edge-fib-retry-stale

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Fibonacci retries + serve-stale + graceful 503 for the c0mpute edge. cloud.killer went dark today when dev2's only gateway died; the edge gave up after one pass.

  • retry rounds: 0.5/0.5/1/1.5 s
  • last good copy served with x-c0mpute-stale: 1
  • 503 page with Retry-After instead of a bare 502
  • gateway sit-out on Fibonacci (5 s .. 5 min)

npm test: 113/113.

🤖 Generated with Claude Code

…nstead of 502

When every gateway failed a request the edge answered 502 at once, so one
gateway restart (dev2's gateway worker died today and cloud.killer went dark)
took every Moshpit name on c0mpute down with it.

- retry the gateway round 4 more times on a Fibonacci schedule (0.5/0.5/1/1.5 s)
- keep the last good 200 of each page (LRU, 4 MiB/page, 128 MiB total) and
  serve it marked x-c0mpute-stale: 1 when every gateway is still down
- otherwise a self-reloading 503 page with Retry-After: 30
- failing gateways sit out on a Fibonacci schedule (5 s .. 5 min)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit e097bdf into main Nov 9, 2026
2 checks passed
@ralyodio
ralyodio deleted the edge-fib-retry-stale branch November 9, 2026 12:05
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

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