Would it make sense to measure the distance to neighbor nodes via traceroute hops?

I.e., discard all neighbors which are below let's say 4-5 hops (wild guess, same data center), prefer higher hop count as an indicator that the node is physically further away and would make a better peer due to that?

What could be the problem with using such a metric in an automated peering system?

1 Answer 1


Considering how the Internet and its routing mechanisms work the hop count is not necessarily a stable metric and would have to be re-evaluated from time to time. Generally speaking though, the hop count is a decent metric to choose peers.

If you look at this paper for example the hop count is considered one of the better of eight metrics to rate "peer selection algorithms." The paper is not about IOTA but about generic peer to peer networks set up for downloading purposes like Bit Torrent. The peer selection problem however seems comparable enough for me to draw from their work.

However, you'd have to define for yourself first what you want to achieve with your peer selection algorithm. You already point to a minimum hop count to "leave the data center", in terms of catastrophe prevention you might also want to select peers from different ISPs—likely you'd want some medium and some low hop counts and some from the same and some from different ISPs.

A problem with any such algorithms could be that someone who knows your peer selection algorithm might use that to their advantage and try to get picked with several of their nodes as neighbor of your node, giving them an information high-ground towards you as a preparation for some sort of attack on your node or the IOTA network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.