System Architecture
How NetSpeedCheck Works
A transparent look under the hood at our two-plane measurement architecture, Web Worker isolation, non-compressible binary streams, and server selection.
Measuring broadband speed inside a modern web browser looks simple on the surface—transfer bytes over a known time interval and time round-trip responses—but naive implementations fail easily. Routing test payloads through serverless web functions, CDN caches, compression filters, or main-thread JavaScript loops distorts throughput and freezes older devices.
NetSpeedCheck separates its architecture into two dedicated planes: a fast Server-Rendered Web & Editorial Plane for guides, calculators, and UI shells, and a standalone, zero-framework High-Throughput Measurement Plane purpose-built for raw byte streaming and low-overhead latency echoes.
1. Decoupled Web Plane vs. Dedicated Measurement Plane
When you read an article or use a calculator on netspeedcheck.online, your browser loads lightweight server-rendered HTML without initializing active network test sockets. Only when you open a diagnostic console and click Start does the client measurement engine connect directly to an active measurement server node:
- Pre-Allocated High-Entropy Buffers: At startup, the standalone measurement server generates a cryptographically random binary buffer (`crypto.randomFillSync`). Serving slices from non-compressible random memory with `Content-Encoding: identity` and `Cache-Control: no-store, no-transform` guarantees that ISP modems, TLS middleboxes, and proxies cannot compress zeros to fake higher download speeds.
- Zero-Buffering Upload Stream Sink: Incoming upload streams attach directly to raw socket data events, counting bytes on the fly with strict size and duration caps without buffering payloads to RAM or disk.
- Off-Main-Thread Web Worker Execution: High-frequency byte counting and `performance.now()` timestamps execute so UI animations, SVG gauges, and accessible screen-reader announcements stay responsive even on multi-hundred-megabit transfers.
2. Step-by-Step Lifecycle of a Speed Test Run
Depending on whether you choose Full Test, Wi-Fi, Download-Only, Upload-Only, Ping, Jitter, or Stability mode, the engine executes the relevant subset of these stages:
- Stage 1 — Server Health & Latency Selection: The browser checks enabled measurement servers via `/health` and parallel `/ping` warmup probes, selecting the healthy node with the lowest measured round-trip latency (while allowing manual user selection when multiple servers are configured).
- Stage 2 — Unloaded Ping & RFC 3550 Jitter: Sequential lightweight probes measure round-trip echo times over a warm connection. Cold connection setup (DNS + TCP + TLS handshake) is excluded so steady-state latency isn't artificially inflated.
- Stage 3 — Adaptive Multi-Stream Download: Parallel HTTPS fetch streams pull binary chunks, ramping buffer sizes dynamically based on observed link velocity (or capping concurrency and byte budgets when Low-Data Mode is active).
- Stage 4 — Parallel Upload Saturation: Binary chunks stream upstream while `XMLHttpRequest.upload.onprogress` tracks acknowledged socket progress over time.
- Stage 5 — Quality Assessment & Optional Share Summary: Raw metrics are graded transparently against streaming, gaming, video call, and cloud backup thresholds.
Engineering Notice
Honest Server Labeling Policy
NetSpeedCheck never fabricates fake 'nearest city' claims. The interface explicitly discloses whether a server was chosen automatically via lowest measured latency across multiple nodes, manually pinned by you, or selected as the single configured measurement server.
3. Mobile Data Safeguards & Instant Cancellation
On fast 5G cellular links exceeding 500 Mbps, an unthrottled 20-second speed test can transfer well over half a gigabyte of data. NetSpeedCheck never starts a transfer automatically on page load, detects browser `Save-Data` preferences automatically, exposes an explicit Low-Data Mode toggle on every test screen, and wires the Stop button directly to `AbortController` socket termination so streaming halts immediately upon click.
| Test Mode | Route | Metrics Captured | Relative Data Usage |
|---|---|---|---|
| Full Broadband Test | / | Download, Upload, Ping, Jitter, Loss & Grade | Moderate – High (scales with link speed; Low-Data available) |
| Wi-Fi Speed Test | /wifi-speed-test | Near-Router vs. Far-Room Download, Upload, Ping & Jitter | Moderate – High (Low-Data available) |
| Download-Only Test | /download-speed-test | Ping, Jitter & Downstream Goodput | ~50% of Full Test |
| Upload-Only Test | /upload-speed-test | Ping, Jitter & Upstream Goodput | ~50% of Full Test |
| Online Ping Test | /ping-test | Min, Median, Avg, Max RTT & Loss % | Ultra-Low (< 100 KB) |
| RFC 3550 Jitter Test | /jitter-test | Consecutive RTT Variance, Std Dev & Ping | Ultra-Low (< 150 KB) |
| Connection Stability Test | /connection-stability-test | 15s–60s Timeline, P95, Spikes, Interruptions & Loss % | Very Low (< 500 KB) |