Documentation contents

How a worker operates

Updated

The measure, sign, upload loop, and what happens when part of it fails.

A running worker does the same four things over and over. Understanding the loop is most of what you need to interpret anything a worker reports about itself.

1. It fetches a target snapshot

The platform decides what should be measured, from the address space providers have registered. The worker receives that as a signed snapshot: a list of targets with a signature it verifies before acting on it. A worker will not measure a target list it cannot verify, which is what stops a worker being redirected at something by whoever controls its network.

Snapshots are refreshed periodically. A worker running on a stale snapshot is measuring a real list that is simply older than the current one; that is a normal state during a refresh and a problem only if it persists.

2. It measures

Each target is measured with ICMP echo requests, in small batches, on an interval. From each batch the worker learns two things: whether replies came back, and how long they took.

That is deliberately modest. A ping tells you about the path between this worker and that address, and nothing more. It does not prove a web server is serving, and silence does not prove an outage: plenty of hosts drop ICMP on purpose. Turning these narrow facts into a statement about a provider is the job of consensus, not of the worker, and is covered in Worker consensus.

3. It signs and uploads

Results are batched and signed with the worker's own key before upload. The signature is what makes a result attributable: the platform can tell which worker produced a measurement, and a result that does not verify is discarded rather than counted.

If the upload fails, the batch is queued and retried. The queue is bounded, so a worker offline for a long time eventually discards its oldest results rather than growing without limit. Losing old measurements is preferable to filling somebody's disk.

4. It sends a heartbeat

About every thirty seconds, independently of whether it has results to upload. The heartbeat is how the platform distinguishes "this worker is running and has nothing to say" from "this worker is gone", which are very different facts about the same silence.

When part of the loop fails

What failsWhat you see
Snapshot fetchThe worker keeps measuring its current list, and the snapshot age grows.
MeasurementResults record the failure. A target that does not answer is a measurement, not a missing one.
UploadBatches queue. Nothing is lost until the queue's bound is reached.
HeartbeatThe platform marks the worker silent after a grace period, and stops counting it toward consensus.

Note the asymmetry in the second row. A failed measurement is data. A worker that cannot reach a target has learned something, and it reports it. Only a worker that cannot report at all produces an absence.

Was this page helpful?

Your answer tells us which pages need rewriting.