Ping with long delay but short reported time

latencyping

What does it mean when a ping reports a reasonable time (~10ms) but actually takes quite a long wall clock time (~15 seconds)? (Additionally, passing the -U option for "full user-to-user latency" has no effect.)

This happens when pinging a certain external host from my work computer – and I'm poking around because I also get timeouts on HTTP requests to the same host. Something similar happens with traceroute, on only the last couple hops, which reach the subnet of the destination.

(Also, for what it's worth, the external host is cdn.sstatic.net, which I know generally works!)

Best Answer

What happens if you use the -n flag to inhibit the lookup of "symbolic names for host addresses"? The sort of behavior you're describing often suggests delays due to slow reverse DNS lookups.

For the example you've given (cdn.sstatic.net), I see that there is no valid reverse entry that corresponds to the forward entry (I'm seeing 69.174.57.102). This is exactly the sort of situation that can lead to weird behavior if you're using tools that attempts reverse lookups.