Skip to content

internet-latency-collector: add cloud node file loader - #4312

Draft
thijsvanemmerik wants to merge 1 commit into
tve/cloud-latency-01-characterisation-testsfrom
tve/cloud-latency-02-node-file-loader
Draft

thijsvanemmerik wants to merge 1 commit into
tve/cloud-latency-01-characterisation-testsfrom
tve/cloud-latency-02-node-file-loader

Conversation

@thijsvanemmerik

Copy link
Copy Markdown
Contributor

Part of measuring latency between AWS regions with the internet latency collector.

Measuring between cloud regions needs more detail per location than the collector's location list
carries: which cloud a region is in, which RIPE Atlas probes may measure from it, and the address
other regions ping to reach it. This adds LoadNodesFromJSON in internal/collector, which reads
a JSON array of those records and rejects the file when a code, cloud, probe list or coordinate
pair is missing, when a code repeats, or when the ping target is not a routable IPv4 address.

The checks matter because a bad file fails quietly. The collector drops a measurement result that
came back with no reply, so a ping target of 10.0.0.1, a private address nothing on the internet
can reach, would give you zero rows and no error. Validation turns that into an error when the
file is read.

Nothing calls the loader yet, so nothing changes in production.

Test: go test ./controlplane/internet-latency-collector/internal/collector/ -run NodeFile

Loads a JSON list of cloud regions, each with a code, cloud name, coordinates,
a non-empty list of RIPE Atlas probe IDs and a ping target address. Validation
rejects duplicates, empty fields and out-of-range coordinates so a bad file
fails at load rather than halfway through a measurement cycle.

Nothing consumes the loader yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant