BareProxy Uptime Checks and Status Pages Plugin: A Public Status Page Served by the Proxy
Status: planned, number 14 of 21 in BareProxy’s build order. The plugins are built easiest first, and this one is two or three days of coding: checks on a timer, history in the store, a status page. It comes after the Cookie consent plugin. This post describes what it will do, and it will be updated as it is built.
When a service has trouble, the first thing its users look for is a status page: is it down, is anyone working on it, when was it last fine. Most teams pay a separate service for that page, and the page knows only what its own checks see from the outside.
The proxy sits in a better spot. It sees every real request, and it already checks the health of every backend.
What It Will Do
- Checks. On a timer, the plugin calls the endpoints its config lists, at addresses the config allows, and records the answer and how long it took.
- History. Results are kept in the plugin’s store: up or down for each check, every minute, for the last 90 days.
- A status page. The plugin serves a plain page at a path the config names, such as
/status, with each component’s state now and its uptime over the last day, week and quarter. - Incident notes. A short message in the plugin’s config (“We’re looking into slow logins”) shows at the top of the page. Changing it is a config change, which
planshows andapplypublishes.
A config will look something like this:
plugin status /etc/bareproxy/plugins/status-pages.wasm
config /etc/bareproxy/plugins/status.json
store 64MB
allow-http 10.0.0.11:8080 10.0.0.12:8080
site status.example.com
use status
route /* -> respond 404 "not found"
One Honest Limit
A status page served by the same proxy as the site goes down with it if the whole machine does. For a small service that’s an acceptable trade, since the page costs nothing extra to run. For anything bigger, the page should run on a second BareProxy somewhere else, checking the first one over the internet like any visitor would.
The whole program is on the plugins page.