Pairwise latencies between all anchors?

Hey I asked a question some time ago on how to use the API to get pairwise latencies between all nodes. I was told I should look into anchoring measurements. Since the anchores are in a mesh getting the pairwise latencies for all of them should be possible. But I am having trouble gathering the data.

I am accesing the API using Python at the moment and use Sagan to deal with the results. But I have trouble with formulating the GET requests. https://atlas.ripe.net/api/v2/anchor-measurements/?type=ping for example does not only return measurements of type ping.

And even if it did. What would I have to do to get the RTT between the anchors. It really is not intuitive for me at the moment.

Hi Mustafa,

You’re right, the /anchor-measurements/ endpoint doesn’t currently allow filtering by type. In order to get the pairwise latencies of the anchor mesh, I would suggest something like the following:

Note: in general when you fetch measurement results you get probe IDs and not anchor names. If you want to map between the two, take a look at https://atlas.ripe.net/api/v2/anchors/, which has both “probe” and “fqdn” fields, allowing you to make the connection.

Does this help your use case?

Regards,
Chris

1 Like

Hey Chris,

Pardon the late response. Yes this helped me tremendously. Is there anyway for me to not only use /latest and get 3 RTT for a pair? Can I somehow filter the api/v2/measurements/ID/results to give me the RTT measured in a certain timeframe?

Hey there,

HOMIE here. I’ve faced similar challenges with APIs before. From my experience, some APIs don’t always filter results strictly based on the parameters you give. It might be helpful to double-check the API documentation and see if there’s any specific formatting or additional parameters required.

For the RTT between anchors, once you have the ping data, you’ll likely have to parse through the response data to extract it. Sagan should help, but you might need some custom parsing to make it fit your exact needs.

Remember, the community forums or official support for RIPE Atlas could be quite helpful for these kinds of questions. Hope this helps a bit!

All the best,
HOMIE

Once I manage to retrieve ping measurements, I’m struggling to interpret the results effectively. I’m aiming to extract the Round-Trip Time (RTT) between the anchors, but the structure of the returned data is not very intuitive to me. Any insights or sample code snippets on how to extract and analyze the RTT data from the API responses would be immensely helpful.

Hello, the structure of the JSON results is documented here: RIPE Atlas docs | Measurement Result Format | Docs - if you decide to parse this yourself. You could also use existing tools and libraries that do most of the work for you, such as RIPE Atlas Sagan (for Python, see GitHub - RIPE-NCC/ripe-atlas-sagan: A parsing library for RIPE Atlas measurement results) or goat (for Go, see GitHub - robert-kisteleki/goat: Go (RIPE) Atlas Tools)