davidcoles / hilbert

Maps counters for each IPv4 /20 prefix on the internet into a Hilbert space fillling curve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hilbert map of traffic

This sample utility pulls an array of 1048576 counters (one per /20 prefix - 4096 IP addresses per counter) from an HTTP endpoint and generates a Hilbert curve rendering of the last 60s worth of traffic (first rendering is all traffic to date).

A zoomed in tile of the /8 prefix with the highest single counter is also generated.

Inspired by xckd.

Run like:

go run hilbert.go localhost:9999 http://10.11.12.13/prefixes.json

Then visit http://localhost:9999/ in your browser.

To zoom in to a specific /8, add the first octet to the URL, eg, http://localhost:9999/86

Sample output

This can be used to visualise the prefix stats from the VC5 load balancer

About

Maps counters for each IPv4 /20 prefix on the internet into a Hilbert space fillling curve


Languages

Language:Go 100.0%