feat: status pages served by the right servers, cached before their first visit #151

Merged
Sebi merged 3 commits from feat/own-statuspage-servers into main 2026-11-24 22:08:21 +00:00
Owner

Three changes to how status page servers get their pages.

Own servers replace the platform's

  • Once one of an organization's own status page servers has connected (last_seen_at set), GET /agent/v1/pages answers platform servers 404 for its pages; they drop them from their cache. A token that never connected changes nothing, so switching over does not take pages offline. Revoking the last own server hands the pages back to the platform.
  • The console shows "own servers" instead of a link to the platform address for pages without a verified custom domain; the editor explains who serves them.

Every page cached before its first visit

  • New GET /agent/v1/pages/index lists the pages a server serves (slug and verified custom domain), following the same rule.
  • Status page servers fetch all of them on start and every five minutes, and drop cached pages that are no longer listed. If the API is unreachable the cache stays as it is.
  • Pages visited in the last ten minutes are still refreshed every 30 seconds; others no longer are. The "may be outdated" notice now appears after ten minutes (twice the sync interval) instead of five.

Refresh by checksum

  • Servers send the checksum of their copy (If-None-Match); the API answers 304 Not Modified when the page is unchanged (the generation time is left out of the checksum), and the server only marks its copy current. The checksum is persisted with the page.
  • The API still builds the snapshot to compare it; what is saved is sending and decoding the page. The server still rewrites its cached copy to record when it was confirmed, so the outdated notice stays right after a restart.

🤖 Generated with Claude Code

https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3

Three changes to how status page servers get their pages. **Own servers replace the platform's** - Once one of an organization's own status page servers has connected (`last_seen_at` set), `GET /agent/v1/pages` answers platform servers 404 for its pages; they drop them from their cache. A token that never connected changes nothing, so switching over does not take pages offline. Revoking the last own server hands the pages back to the platform. - The console shows \"own servers\" instead of a link to the platform address for pages without a verified custom domain; the editor explains who serves them. **Every page cached before its first visit** - New `GET /agent/v1/pages/index` lists the pages a server serves (slug and verified custom domain), following the same rule. - Status page servers fetch all of them on start and every five minutes, and drop cached pages that are no longer listed. If the API is unreachable the cache stays as it is. - Pages visited in the last ten minutes are still refreshed every 30 seconds; others no longer are. The \"may be outdated\" notice now appears after ten minutes (twice the sync interval) instead of five. **Refresh by checksum** - Servers send the checksum of their copy (`If-None-Match`); the API answers `304 Not Modified` when the page is unchanged (the generation time is left out of the checksum), and the server only marks its copy current. The checksum is persisted with the page. - The API still builds the snapshot to compare it; what is saved is sending and decoding the page. The server still rewrites its cached copy to record when it was confirmed, so the outdated notice stays right after a restart. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi added 1 commit 2026-11-24 21:45:49 +00:00
feat(api): organizations with own status page servers serve their pages alone
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Canceled after 6m3s
ci / test (pull_request) Canceled after 6m2s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s
c0239e15bb
The platform's status page servers handed out every published page,
including those of organizations running their own servers. Once one of
an organization's own status page servers has connected, the agent API
now answers the platform's servers 404 for its pages, so they drop them
from their cache, and only the organization's servers serve them. A
created but never connected token changes nothing, so moving over does
not take the pages offline.

The console no longer links such pages to the platform's address,
which would not serve them; the editor says who does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi changed title from feat(api): organizations with own status page servers serve their pages alone to feat: status pages served by the right servers, cached before their first visit 2026-11-24 21:51:56 +00:00
Sebi added 1 commit 2026-11-24 21:51:58 +00:00
feat(statuspage): fetch every served page every five minutes
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Canceled after 5m23s
ci / test (pull_request) Canceled after 5m23s
ci / build (pull_request) Canceled after 0s
ci / image (pull_request) Canceled after 0s
4e9a198b2f
A status page server only knew the pages visitors had asked it for, so
during an API outage a server that had never seen a page could not
serve it. The agent API now lists the pages a server serves
(GET /agent/v1/pages/index), following the same rule as single pages,
and status page servers fetch all of them on start and every five
minutes, also dropping those no longer listed. Pages visited within the
last ten minutes are still refreshed every 30 seconds; the outdated
notice now appears after ten minutes, twice the sync interval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi added 1 commit 2026-11-24 21:57:33 +00:00
feat(statuspage): refresh pages by checksum
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 6m46s
ci / test (pull_request) Successful in 14m46s
ci / build (pull_request) Successful in 18m49s
ci / image (pull_request) Successful in 3m24s
fcf615dce7
Each refresh sent the whole page again even when nothing had changed.
Status page servers now send the checksum of their copy (If-None-Match)
and the API answers 304 when the page, leaving out when it was
generated, is unchanged; the server then only marks its copy current.
The checksum is kept on disk with the page, so it survives restarts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi merged commit f3d0a4c844 into main 2026-11-24 22:08:21 +00:00
Sebi deleted branch feat/own-statuspage-servers 2026-11-24 22:08:23 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ZB-Server/uptimesebi#151