STATUS: OPERATIONAL.
Deleted, in exchange for this: one container (ghcr.io/librespeed/speedtest,
the LAST upstream image running on srv), one systemd unit, one port, one
docker network, one vhost, one DNS record. ~1.75GB of layers reclaimed.
What replaced it: four PHP files and one JS file, served by something already
running. Three routes, no state, no database, no settings page, nothing to
administer.
Design decisions that are load-bearing, not taste:
- Payload is RANDOM. Random bytes do not compress. Anything compressible
hands you a number about your CPU and lets you believe it is about your
connection.
- Download STREAMS via ICallbackResponse. A 50 MiB test costs 1 MiB of RAM,
and the browser sees bytes arriving instead of waiting for a lump.
Throughput, not time-to-first-byte.
- NOTHING touches storage. Not one read, not one write. The bulk data here
lives on NFS and a vanity metric does not get to compete with real IO
for it.
- Latency is a MEDIAN of ten sequential probes. One hiccup does not get
a vote.
- No build step. No webpack, no bundler, no node_modules the size of a
kernel source tree to render four numbers and a button. The JavaScript
in this repo is the JavaScript that runs.
The most reliable service is the one you deleted. It has never had an outage,
it has never had a CVE, and it does not appear in the supply chain because it
does not exist.
Closes the hosting half of ops/features#33.
The node remains online. Against my better judgment.
17 lines
1.3 KiB
CSS
17 lines
1.3 KiB
CSS
#speedtest-app { display:flex; justify-content:center; width:100%; padding:2rem 1rem; box-sizing:border-box; }
|
|
.st-wrap { width:100%; max-width:720px; }
|
|
.st-title { margin:0 0 .25rem; font-size:1.5rem; font-weight:600; }
|
|
.st-sub { margin:0 0 1.5rem; opacity:.7; font-size:.9rem; }
|
|
|
|
.st-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.75rem; margin-bottom:1.25rem; }
|
|
.st-tile { background:var(--color-background-hover); border:1px solid var(--color-border); border-radius:var(--border-radius-large,12px); padding:1rem; }
|
|
.st-label { font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; opacity:.6; margin-bottom:.35rem; }
|
|
.st-value { font-size:1.9rem; font-weight:600; line-height:1.1; font-variant-numeric:tabular-nums; }
|
|
.st-value .st-unit { font-size:.8rem; font-weight:400; opacity:.6; margin-left:.3rem; }
|
|
.st-tile.active { border-color:var(--color-primary-element); }
|
|
|
|
.st-bar { height:6px; background:var(--color-background-dark); border-radius:3px; overflow:hidden; margin-bottom:.6rem; }
|
|
.st-bar-fill { height:100%; width:0; background:var(--color-primary-element); transition:width .2s linear; }
|
|
.st-status { font-size:.85rem; opacity:.75; min-height:1.2em; margin-bottom:1.25rem; }
|
|
.st-go[disabled] { opacity:.5; cursor:not-allowed; }
|