Honor server backoff and section freshness in live polling #465

Closed
opened 2026-08-10 08:09:41 +00:00 by timmy · 0 comments
Owner

Problem

The live dashboard poller retries every 8 seconds after both successful and failed requests. The backend already returns per-section freshness and retry_in_seconds, but the browser only displays this scheduling data. During a full upstream cooldown, every visible tab continues polling; during a partial outage, a blanket delay would also risk slowing healthy sections.

Vertical slice

  • Schedule from the earliest healthy section freshness deadline.
  • When all sections are degraded, honor the server cooldown.
  • Honor HTTP Retry-After and use bounded transport-failure backoff.
  • Keep reconnect, visibility restore, and explicit refresh immediate.
  • Document and behavior-test the scheduling contract.

Acceptance tests

  • A wholly degraded snapshot with retry_in_seconds: 60 waits 60 seconds.
  • A partial failure schedules at the earliest healthy section deadline.
  • HTTP 503 Retry-After controls the next attempt.
  • Consecutive transport failures back off to a cap and success resets the streak.
  • Explicit refresh/reconnect bypasses delayed retries without stale response overwrite.
  • Existing polling and full suites pass.

Non-duplication

Historical #131 pooled dashboard polling; #149 added server-side outage cooldown; #285 omitted unchanged payloads; #303 recovered stalled requests; #433 shared refreshes across workers. None makes the browser consume section freshness, cooldown, or Retry-After. No open issue or PR covers this behavior.

## Problem The live dashboard poller retries every 8 seconds after both successful and failed requests. The backend already returns per-section freshness and `retry_in_seconds`, but the browser only displays this scheduling data. During a full upstream cooldown, every visible tab continues polling; during a partial outage, a blanket delay would also risk slowing healthy sections. ## Vertical slice - Schedule from the earliest healthy section freshness deadline. - When all sections are degraded, honor the server cooldown. - Honor HTTP `Retry-After` and use bounded transport-failure backoff. - Keep reconnect, visibility restore, and explicit refresh immediate. - Document and behavior-test the scheduling contract. ## Acceptance tests - A wholly degraded snapshot with `retry_in_seconds: 60` waits 60 seconds. - A partial failure schedules at the earliest healthy section deadline. - HTTP `503 Retry-After` controls the next attempt. - Consecutive transport failures back off to a cap and success resets the streak. - Explicit refresh/reconnect bypasses delayed retries without stale response overwrite. - Existing polling and full suites pass. ## Non-duplication Historical #131 pooled dashboard polling; #149 added server-side outage cooldown; #285 omitted unchanged payloads; #303 recovered stalled requests; #433 shared refreshes across workers. None makes the browser consume section freshness, cooldown, or `Retry-After`. No open issue or PR covers this behavior.
timmy self-assigned this 2026-08-10 08:09:41 +00:00
timmy closed this issue 2026-08-10 08:19:38 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#465
No description provided.