Alfian Yusuf Abdullah
All work

2026 · Shipped

Edge latency atlas

A world map that measures real round-trip latency from your browser to 30 Cloudflare locations, then draws the results as a contour field.

Role
Design + build
Stack
Workers, Durable Objects, Canvas
Live
Open
Source
Repository

Every CDN status page tells you where the network is. None of them tell you what it actually costs you from where you are sitting. I wanted to see the shape of my own latency, so I measured it.

How it works

The browser opens a WebSocket to the nearest Worker, which upgrades and hands the connection to a Durable Object. That object pings a fixed list of 30 colo endpoints and streams results back as they arrive.

export class Probe extends DurableObject {
	async measure(targets: string[]) {
		const samples = await Promise.all(
			targets.map(async (target) => {
				const start = performance.now();
				await this.env.TARGET.fetch(target, { method: "HEAD" });
				return { target, rtt: performance.now() - start };
			}),
		);
 
		return samples.sort((a, b) => a.rtt - b.rtt);
	}
}

Results land in a plain array of { target, rtt } pairs. The canvas layer converts that into a contour field with a marching squares pass, which is the part I underestimated.

What I got wrong

I assumed the interesting variation would be geographic. It is not. The dominant term is peering, and two locations 400km apart can differ by a factor of four depending on which transit provider each one prefers that week.

The map is therefore somewhat honest and somewhat useless: it shows real numbers, but those numbers move enough that a single screenshot is misleading.

What I would change

Store a rolling seven-day median per colo instead of showing the instantaneous value. Right now the tool tells you something true and unactionable.