Hetzner checks answer again; failed checks go to the console (closes #114)
check / check (push) Waiting to run

The Hetzner speed-test servers close the connection without an answer
when the URL has a query string, and every check added ?_cb= and the
time, so all six showed unreachable. Checks now fetch each target's URL
as written; cache: "no-store" still keeps the browser's cache out of the
measurement.

Each recorded check that fails writes one console.error line, and the
same line to the debug log: the target's name and URL, the time, what
failed and how long the request took. A target that answers after
failed checks writes one console.info line. Checks the page does not
record write nothing, so the debug log no longer lists failures in the
first round or the recovery probe.

Model: opus-5-5
This commit was merged in pull request #116.
This commit is contained in:
2026-10-07 12:24:51 +02:00
parent 186f932eb8
commit dcdee6bfab
4 changed files with 244 additions and 36 deletions
+22 -11
View File
@@ -188,17 +188,28 @@ Local hosts are tracked separately from WAN stats.
### Latency measurement
GET requests with `mode: 'no-cors'`, `cache: 'no-store'` and a cache-busting
query parameter, timed with `performance.now()`. Each check times out after 80%
of the refresh interval (24 seconds at 30 seconds) and is then recorded as a
timeout, so a round's checks have all finished before the next round is due.
When no WAN host answers, a recovery probe checks 4 WAN hosts, picked at random
when it starts, every half second, giving up the checks it started half a second
before. As soon as one answers, a new round starts at once, as it does after an
interval change. A round started early gives up the last round's checks if they
are still waiting, and that round records nothing more, so rounds never overlap.
The browser chooses between IPv4 and IPv6 for each target, as for any request;
the local targets are IPv4 addresses.
GET requests to each target's URL as written, with `mode: 'no-cors'` and
`cache: 'no-store'`, timed with `performance.now()`. No query string is added:
the Hetzner speed-test servers close the connection without an answer when the
URL has one, and `no-store` keeps the browser's cache out of the measurement.
Each check times out after 80% of the refresh interval (24 seconds at 30
seconds) and is then recorded as a timeout, so a round's checks have all
finished before the next round is due. When no WAN host answers, a recovery
probe checks 4 WAN hosts, picked at random when it starts, every half second,
giving up the checks it started half a second before. As soon as one answers, a
new round starts at once, as it does after an interval change. A round started
early gives up the last round's checks if they are still waiting, and that round
records nothing more, so rounds never overlap. The browser chooses between IPv4
and IPv6 for each target, as for any request; the local targets are IPv4
addresses.
Each recorded check that fails writes one line to the browser console with
`console.error`, and the same line to the debug log: the target's name and URL,
the time, whether it timed out, answered over the time limit or hit a network
error (with the error the browser gives the page, such as
`TypeError: Failed to fetch`, which does not say why), and how long the request
took. A target that answers after failed checks writes one `console.info` line
with its latency and how many checks in a row had failed.
### Color coding