Ping time depends on which factors

Does the ping time only depend on the total distance traveled by the signal or it depends on other factors?

Ping time is essentially a measure of the time it takes to send a request to remote host and get a response.

Factors Ping time depends on

  1. Number of Hops between you and the remote host
  2. Network Congestion between these hops
  3. Delay incurred due to routing performance at these hops
  4. Distance

You can run a traceroute command to check the hops between you and a remote host. Say when i run

  1  0.983ms  0.850ms  0.777ms    // My Home Router
  2   103.82.xx.xx  2.305ms  1.926ms  1.856ms    // My ISP's Router/Concentrator
  3   103.82.xx.xx  4.634ms  3.199ms  2.769ms    // My ISP's Border Router
  4  3.696ms  3.629ms  5.164ms    // Airtel's Border Router to My ISP
  5  78.173ms  80.210ms  86.224ms // Airtel's Border Router to Next ISP(In this case Facebook)
  6  81.448ms  75.143ms  72.892ms // Internal ISP Routing
  7  75.697ms  75.271ms  75.367ms
  8  76.000ms  76.867ms  75.712ms
  9  74.681ms  75.286ms  74.435ms
 10  76.788ms  76.527ms  76.452ms

We end at Let’s where/who it is

  "country"     : "Singapore",
  "countryCode" : "SG",
  "region"      : "01",
  "regionName"  : "Central Singapore",
  "city"        : "Singapore",
  "district"    : "",
  "zip"         : "",
  "lat"         : 1.28009,
  "lon"         : 103.851,
  "timezone"    : "Asia/Singapore",
  "isp"         : "Facebook, Inc.",
  "org"         : "Facebook, Inc.",
  "as"          : "AS32934 Facebook, Inc.",
  "mobile"      : false,
  "proxy"       : false,
  "query"       : ""

So it is in Singapore, owned by Facebook Inc. Total ping time : ~77ms.

Theoretically speaking, we can calculate the minimum possible ping time for such a request
Displacement from New Delhi to Singpore (Bird’s path) : 4,163.24 km
Assuming light speed for communication and elementary Physics : 4,163.24/ 3,00,000 = ~ 13.8ms

Reasons for the difference ?

  1. We don’t have a single, point to point optical fiber from my home to Facebook Datacenter in Singapore, so my request needs to travel a lot more than the displacement.
  2. The request has to be processed and routed by many routers along the way, which takes time, computers are slow (slower than light)
  3. Congestion. If there is network congestion between any two hops, the Internet is designed to use protocols to handle such congestion either by delaying your request or dropping the packet entirely.

Lastly, Different ISPs use different routes to reach different places around the world, so it is expected to have different ping times to remote locations using different internet connection, even if you are in the exact same place.

Here is graph of how Bharti Airtel is connected to other ISPs across the world.

Sources: Trust me, I run an ISP