<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Can Network Latency be used as a 'Distance Sensor'?]]></title><description><![CDATA[Can Network Latency be used as a 'Distance Sensor'?]]></description><link>https://my-networkingblog.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Can Network Latency be used as a &apos;Distance Sensor&apos;?</title><link>https://my-networkingblog.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 09:12:13 GMT</lastBuildDate><atom:link href="https://my-networkingblog.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Can Network Latency be used as a 'Distance Sensor'?]]></title><description><![CDATA[Imagine you are sitting in Mumbai; you send a data packet to the other side of the world and get a response within a fraction of a second. You know exactly how long the journey took. But can you tell ]]></description><link>https://my-networkingblog.hashnode.dev/can-network-latency-be-used-as-a-distance-sensor</link><guid isPermaLink="true">https://my-networkingblog.hashnode.dev/can-network-latency-be-used-as-a-distance-sensor</guid><category><![CDATA[networking]]></category><category><![CDATA[latency]]></category><category><![CDATA[experiment]]></category><category><![CDATA[First Blog]]></category><dc:creator><![CDATA[Rutu Varhadi]]></dc:creator><pubDate>Mon, 28 Sep 2026 05:00:00 GMT</pubDate><content:encoded><![CDATA[<p>Imagine you are sitting in Mumbai; you send a data packet to the other side of the world and get a response within a fraction of a second. You know exactly how long the journey took. But can you tell how far away that computer is? No GPS, no coordinates, just a number, 85 milliseconds. <strong>Is this number enough to measure the distance?</strong> Let’s find out!</p>
<p>If two servers as far apart geographically, the packet should generally take longer to travel between them. This implies that the internet behaves like a straight road PS: It does not.</p>
<p>Latency is the time it takes for data to pass from one point on a network to another [<a href="https://www.cloudflare.com/learning/performance/glossary/what-is-latency/">1</a>]. The amount of time it takes for a response to reach a client device after a client request is known as Round Trip Time (RTT). RTT is equal to double the amount of latency, since data must travel in both directions — there and back again [<a href="https://www.cloudflare.com/learning/performance/glossary/what-is-latency/">2</a>]. This time is measured in milliseconds (ms). It may not feel as significant, but it is. While building something like a website, companies put a lot of effort into minimizing latency to not make users wait longer for it to load or completely shut the website due to delay. When a user clicks on a website it sends a ‘ping’ to the nearest server; this ping measures the RTT. We're investigating whether that time contains enough information to estimate distance.</p>
<p><strong>Why does distance affect latency?</strong> Data packets travel at a finite speed through physical infrastructure, often optical fiber. Hence, longer the physical path, more propagation time, potentially higher latency. But if distance was the single factor that affected latency, our graph would be beautifully simple: as distance increases, latency increases. But it is not.</p>
<p>To test our hypothesis, we chose destinations at different distances from our computer (located in Mumbai). We selected three locations London, New York, and Sydney and we first pinged our own router to see how long it takes for data to travel in our Local network.</p>
<p>For each destination, we sent 20 ICMP echo requests using the ping command. We then recorded the minimum, maximum, and average Round-Trip Time (RTT), along with the packet loss for each location. Following are our observations:</p>
<table>
<thead>
<tr>
<th>Location</th>
<th>Packets Sent</th>
<th>Packets Received</th>
<th>Average RTT</th>
<th>Minimum</th>
<th>Maximum</th>
<th>Packet Loss</th>
</tr>
</thead>
<tbody><tr>
<td>Default Gateway</td>
<td>-</td>
<td>-</td>
<td>4 ms</td>
<td>0 ms</td>
<td>15 ms</td>
<td>0%</td>
</tr>
<tr>
<td>London</td>
<td>20</td>
<td>20</td>
<td>118 ms</td>
<td>116 ms</td>
<td>134 ms</td>
<td>0%</td>
</tr>
<tr>
<td>New York</td>
<td>20</td>
<td>20</td>
<td>186 ms</td>
<td>184 ms</td>
<td>194 ms</td>
<td>0%</td>
</tr>
<tr>
<td>Sydney</td>
<td>20</td>
<td>20</td>
<td>298 ms</td>
<td>282 ms</td>
<td>311 ms</td>
<td>0%</td>
</tr>
</tbody></table>
<p>Table 1: Observations recorded during the experiment.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aba38fd44e8dd95691ef206/c94bd532-6f05-4405-9ab2-ecf5b9fe6982.png" alt="" style="display:block;margin:0 auto" />

<p>Figure 1: A graph showing the average RTT.</p>
<p>The result shows a significant increase in the average RTT as we move from the nearby destination to geographically farther destinations. The default gateway (i.e. our own router) had an average RTT of only 4ms, while London, New York and Sydney measured 118ms, 186ms and 298ms respectively.</p>
<p>At first, these observations seem to support our hypothesis; destinations that are farther away have higher latency. However, the result also reveals something unexpected. Sydney produced and average RTT of 298ms and New York produced 186ms. This is interesting because Sydney is geographically closer to Mumbai than New York. Still the packets took longer to complete round trip to Sydney.</p>
<p><strong>So, if distance isn’t the only factor, what is affecting latency?</strong></p>
<p>Latency is affected by many other factors some of these are listed below:</p>
<ol>
<li><p>Routing: Packets don’t compulsorily take the geographically shortest route; they travel through the network according to routing decisions [<a href="https://aws.amazon.com/what-is/routing/">3</a>].</p>
</li>
<li><p>Network Hops: Before reaching the destination, packets may have to pass multiple routers and networks [<a href="https://www.lenovo.com/in/en/glossary/what-is-a-hop/?orgRef=https%253A%252F%252Fwww.google.com%252F&amp;srsltid=AU7gw4WjUFM_wcPnH0a6wHzTByI5yTmckJYeOl_cXBBTRTTNvTbpnyiY">4</a>].</p>
</li>
<li><p>Processing and Queuing: Packets are processed by routers and packets may have to wait when networks are busy [<a href="https://docs.trisul.org/glossary/queueing/">5</a>].</p>
</li>
<li><p>Physical Infrastructure: The actual network path may not be the same as the shortest straight-line geographical distance between two destinations.</p>
</li>
</ol>
<p>This implies, that RTT doesn’t just represent the geographical distance, it represents the behaviour of the entire network path.</p>
<p>In our experiment, all 20 packets were successfully received by the three destinations, giving us 0% packet loss. This means that packet loss did not complicate the measurements in the experiment.</p>
<p>Our experiment hints that geographical distance does influence network latency; farther the destination higher the average RTT. However, the Sydney result proves that distance alone doesn’t affect latency. Network routing, infrastructure, processing and queuing can all influence the time a packet takes to complete its journey.</p>
<p><strong>Therefore, latency can provide a rough indication of network distance or proximity, but it can’t be relied upon as a precise geographical distance sensor.</strong></p>
<p>A number like 118ms may seem less significant, but it contains information about the journey the data packet has taken.</p>
<p>Our experiments showed that latency does get affected by distance, but the internet is not a straight-line between two points; packet must travel through a complicated web of routers, links and networks.</p>
<p>So, can we use latency to measure the distance between two points?</p>
<p><strong>Not exactly, but we can use it as a clue.</strong></p>
<hr />
<p><strong>Bibliography</strong></p>
<ol>
<li><p><a href="https://www.cloudflare.com/learning/performance/glossary/what-is-latency/">CloudFlare: What is Latency?</a></p>
</li>
<li><p><a href="https://www.cloudflare.com/learning/performance/glossary/what-is-latency/">CloudFlare: What causes Internet Latency?</a></p>
</li>
<li><p><a href="https://aws.amazon.com/what-is/routing/">Amazon AWS: What is Routing?</a></p>
</li>
<li><p><a href="https://www.lenovo.com/in/en/glossary/what-is-a-hop/?orgRef=https%253A%252F%252Fwww.google.com%252F&amp;srsltid=AU7gw4WjUFM_wcPnH0a6wHzTByI5yTmckJYeOl_cXBBTRTTNvTbpnyiY">Lenovo: What is a Hop?</a></p>
</li>
<li><p><a href="https://docs.trisul.org/glossary/queueing/">Trisul: What is Queuing in Networking?</a></p>
</li>
</ol>
<hr />
<p><strong>Authors</strong></p>
<p>Team- Ink &amp; Impact. (First Year Students of B.Eng. in Software Engineering, in Vidyalankar Institute for International Education)</p>
<p>Members:</p>
<p>Rutu Varhadi.</p>
<p>Tanay Chetpelly.</p>
<p>Om Bait.</p>
<p>Aaron Guddeti.</p>
<p>Sanvi Rokade.</p>
<p>Under the guidance of Dr. Amit Nerurkar (Associate Professor, Vidyalankar Institute of Technology)</p>
]]></content:encoded></item></channel></rss>