View Single Post
  #2 (permalink)  
Old February 21st, 2009
GregorK GregorK is offline
Phex Developer
 
Join Date: May 8th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

Ping/Pong on Gnutella is not mainly used to measure latency or any other time related issue. Actually I don't even know a single servent which uses Ping/Pong to measure any kind time or latency related things.

On Gnutella Ping/Pong is mainly used to discover more parts of the network and find other nodes which are of high value for you.
There are usually two types of Pings. The KeepAlive-Pings carry a TTL of 1 and are only used to check if your neighbor still responds with a Pong or is offline or overloaded.
Then there are Pings with higher TTL, your neighbor will respond to this Ping but he also forwards the Ping to its neighbors (at least in the traditional Ping/Pong schema) and routes the Pongs back to you. This way you learn about hosts further away from you. Additionally the Pongs carry node information, most importantly its uptime. With the uptime data you build yourself a list of nodes mainly ordered by uptime and maybe some other criteria (every vendor has its own recipe).
Next time you go online your servent will go through this list and tries to connect to the nodes it will most likely successful connect to first.

Today most servents don't use the traditional Ping/Pong concept anymore. It causes too much traffic. It was replaced by a Pong caching algorithm. But the concept remains the same. Depending on your Ping TTL your neighbor will send you Pongs from nodes further away.

Gregor
__________________
Reply With Quote