Skip to content
appsbynate
← dev tools

Statuspage

A dependency-free status page that renders 90 days of uptime from a flat JSON file.

Section
dev tools
Year
2024
Role
Solo project
Stack
Astro, TypeScript, Cloudflare

Replace this file with a real project. This one is deliberately not featured, so it appears on /projects but not on the home page.

The problem

Every hosted status page I looked at wanted $29/month to render a grid of green squares, and the ones that were free wanted to run a script on the pages they were reporting on.

What I chose, and why

A worker pings each endpoint every five minutes and appends the result to a flat JSON file in object storage. The page is statically rebuilt from that file on each write.

No database. The entire history for 90 days across a dozen endpoints is under 400KB, which fits comfortably in a single fetch, and “just re-read the file” is a much smaller thing to operate than a time-series store.

The trade is that this stops working somewhere around a few hundred endpoints or sub-minute resolution. Neither is a situation I expect to be in, and if I ever am, the JSON is trivially importable into something real.

The hard part

Deciding what counts as down. The naive version — a non-200 means an outage — produced a wall of red every time a deploy briefly 503’d, which trained me to ignore the page entirely.

What worked was requiring two consecutive failed checks from two different regions before recording an incident. False positives went to roughly zero, at the cost of up to ten minutes of detection latency, which for a personal project is the right side of that trade.

What I’d change

The 90-day window is hardcoded in three places. It should be one constant, and I’ve been meaning to fix it since about week two.