You've got a run in flight, and one group of requests keeps timing out while the rest look fine. The ad check passes in one browser session, fails in another, and the scraping job only misses the target page when the proxy pool rotates at the wrong moment. That's the kind of mess latency creates, because the problem usually isn't one bad sample. It's a distribution hiding behind a clean-looking average.
If you measure latency the wrong way, you'll spend hours tuning the wrong layer. The request might be slow because of DNS, TCP setup, TLS negotiation, server processing, packet loss, or the proxy path itself. In mobile and 4G workflows, the public IP, the ASN, and carrier-grade NAT can change the shape of what you see, so the path you test in a datacenter won't tell you much about the path your real traffic takes. A good benchmark starts by treating latency as a curve, then breaks that curve apart until the slow piece is obvious.
The Real Cost of a Slow Request
A scraping run that looks healthy on paper can still be brittle in production. The job scheduler reports normal throughput, but a few pages stall long enough to trigger retries, and the whole batch finishes late. In ad verification, the same pattern shows up as a test that looks fine in a low-load browser, then returns inconsistent outcomes when the network path changes or the proxy rotates mid-session. In both cases, the visible symptom is a missed deadline, but the cause is usually spread across many requests, not one dramatic outage.
That's why averages are dangerous. A service can have a respectable mean and still feel slow to users because the tail is ugly. If you only look at one summary number, you miss the slowest requests, and those are the ones that break login flows, time-sensitive checks, and geo-dependent tests.
Practical rule: treat latency as a sample set, not a single reading. The first question isn't “What's the average?” It's “What does the tail look like, and what changed there?”
When I'm debugging a scraping or verification path, I start with the shape of the latency, not the mean. A clean median with ugly p95 or p99 means the system is mostly fine, but a small slice of traffic is getting hammered by congestion, retries, or a bad hop. That slice is often enough to wreck production behavior.
For teams that run through mobile paths, this matters even more. A 4G route can look stable for a while, then shift because of the network, the carrier, or the proxy session state. That's why the right reference point is a full distribution, not a comfortingly small average. If you need a baseline for network stability concepts, keep an eye on the broader operational context as well, because latency is only one side of path quality: network stability reference.
Latency Fundamentals You Need Before You Test

Start with the terms that matter
Round-trip time, RTT, is the time for a packet to go out and come back. It's the basic unit most network tools expose, and it's usually measured in milliseconds. One-way delay is only valid when both ends have tightly synchronized clocks, which is why most production teams stick to RTT unless they control the timing on both sides. Jitter is variation between measurements, packet loss is missing traffic, and throughput is how much data the path can carry over time.
Percentiles give you the practical view. p50 is the middle of the distribution, p95 shows the level 95% of requests stay under, and p99 pushes deeper into the tail where the rare slow requests live. If the median is fine but p95 and p99 stretch out, your users are still going to feel it.
Think in layers, not in one hop
Latency starts at the link layer, but users experience it at the application layer. A packet has to be sent, routed, transported, reassembled, and finally processed by the service. That means a single ping can only tell you part of the story, because it mainly measures the path, not the work done by the application once the packet arrives.
A useful mental model is simple. Physical path quality affects RTT, transport behavior affects retransmits and connection setup, and application work affects how long the request waits before the first byte comes back. That's why you'll end up measuring at several layers if you want a dependable answer.
If a test only shows one number, assume it's incomplete until proven otherwise.
Mobile 4G connections add another layer of variability. The public IP may sit behind carrier-grade NAT, multiple users can share the same public address, and the traffic may be grouped by ASN context rather than by a simple residential footprint. That changes both what the path looks like and how downstream systems classify it, which is why proxy-based testing needs its own measurement discipline.
Measuring Latency From the Command Line

Ping tells you the first-pass RTT
Use ping when you want a fast read on path quality. A simple command like ping -c 20 target gives you a small sample set, and the output usually ends with min/avg/max plus a spread value. The latency field to read is the RTT line, not the packet sequence.
Example output pattern:
20 packets transmitted, 20 received, 0% packet loss
rtt min/avg/max/mdev = 12.4/18.7/41.3/6.2 ms
Here, avg is useful only as a rough orientation, while max hints at the tail. If the max is much uglier than the average, you've already learned that the path isn't stable enough for sensitive workflows.
Traceroute shows where the path slows down
Use traceroute target when you need hop-by-hop timing. The number to watch is the RTT shown per hop, because that's where the delay accumulates. A slow hop doesn't always mean a fault, but it does tell you where the path starts to widen.
Example output pattern:
1 1.1 ms 1.0 ms 1.2 ms
2 4.8 ms 5.1 ms 4.9 ms
3 19.6 ms 20.1 ms 21.0 ms
If the jump appears at hop 3 and stays high after that, the bottleneck is probably upstream of the target, not inside it. If the first slow hop appears and later hops recover, don't over-interpret it. Some routers de-prioritize probe replies, which makes them look slow without harming actual traffic.
MTR combines the two views
mtr target is useful when you want a live report of both path and loss. The columns to read are Loss% and Avg. A hop with rising loss and rising average RTT is more worrying than one with a single weird spike.
Example output pattern:
Host Loss% Avg Best Wrst
1 0.0% 1.1 1.0 1.5
2 0.0% 5.0 4.8 5.4
3 2.0% 20.4 19.7 41.2
The command is most helpful when you let it run long enough to see patterns instead of single blips. For proxy work, that matters because a rotated route can look fine for a minute and then drift once the session changes. If you're building a repeatable benchmark around proxy speed, keep the session stable and compare the run against a fixed baseline, then use a dedicated proxy speed check workflow such as this proxy speed test guide.
Iperf3 tells you how the link behaves under load
Use iperf3 when you care about capacity and load sensitivity. A basic command like iperf3 -c target checks how the path behaves when data is flowing, not just when a probe is bouncing back. The field to watch is the transfer rate, because latency often worsens once the link gets busy.
Example output pattern:
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 120 MBytes 101 Mbits/sec
That isn't a latency number by itself, but it tells you whether congestion is likely to affect your request timings. If throughput collapses under load, the request path is going to feel that pressure somewhere.
Tcpdump and tshark expose packet-level timing
tcpdump is for capture, and tshark or Wireshark is for analysis. Capture the flow, then inspect ICMP or transport statistics to see minimum, maximum, mean, median, and standard deviation. Those fields help you understand whether the distribution is tight or noisy.
Example capture pattern:
tcpdump -i any host target
ICMP statistics: min 12 ms, max 71 ms, mean 19 ms, median 16 ms, stddev 8 ms
That's the most honest view you'll get when a ping average hides the shape of the tail. It also helps when you suspect the proxy hop is adding delay in a way that hop-by-hop tooling can't explain cleanly.
Application and Browser Latency You Can Actually See
A request can look fast at the network layer and still feel slow in the browser. That's why I always break it down with curl before I trust anything else. The useful fields are DNS time, TCP connect time, TLS time, TTFB for time to first byte, and total time.
A practical command looks like this:
curl -o /dev/null -s -w "dns:%{time_namelookup} tcp:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer} total:%{time_total}\n" https://example.com
Sample output:
dns:0.012 tcp:0.045 tls:0.089 ttfb:0.150 total:0.320
That one line tells you where the wait is happening. If DNS is cheap but TTFB is slow, the server or proxy path is the issue. If TCP and TLS are the drag, you're looking at connection setup, not content delivery.
Use the browser waterfall for user-facing timing
Browser DevTools gives you a different angle. The Network panel waterfall shows where each request spent time, and the Timing tab splits it into stalled, DNS lookup, initial connection, SSL, request sent, waiting (TTFB), and content download. That breakdown matters because a page can appear broken even when the backend is healthy.
If the waterfall shows most of the wait before the request goes out, the browser or proxy path is the choke point. If waiting dominates, the backend is slow to respond. If content download is the long pole, the payload is too heavy or the connection is too constrained.
Useful habit: compare the browser waterfall with the
curltiming line from the same target. If they disagree, the browser path has extra overhead that your CLI test isn't seeing.
Synthetic monitoring and real-user monitoring serve different purposes. Synthetic checks are controlled and repeatable, which is what you want for regression testing. Real-user timing captures what actual visitors experience, which is better for spotting long-tail issues that only show up in the wild.
For pipeline work, the cleanest answer is often to timestamp the event at ingest, processing, and serving, then subtract adjacent points. Amplitude's stage-based framing for event timing and Snowplow's definition of data latency both point to the same idea, the useful number is often the time from one stage to the next, not just the end-to-end total. That's the latency profile ad-verification and market-research flows usually need.
Reading the Numbers Without Fooling Yourself
An average can look healthy while the user experience is miserable. Suppose most requests finish in a small band, but a few slow ones stretch far out. The median may stay calm, the average may move only a little, and yet the people hit by the tail feel the system is broken.
Read the percentiles as a shape
p50 tells you what normal feels like. p95 tells you how far the common tail stretches. p99 tells you whether rare pain is creeping into production. When p50 stays flat but p99 climbs, the system is becoming less predictable even if the center of the distribution looks fine.
That's the first place I look in a production benchmark. If p99 is ugly, I stop treating the mean as a decision metric and start treating it as a noise source.
Separate hop problems from service problems
A slow first hop in traceroute or MTR usually points to path congestion, distance, or the proxy route itself. A lossy hop can be a routing artifact, especially if later hops don't degrade the same way. A slow DNS lookup means you should test name resolution separately, while a slow TLS handshake usually means connection setup or certificate negotiation is the drag. If the server side is slow after all that, the time to first byte will show it.
The safest workflow is repetitive, not clever. Establish a baseline, test under load, split by time of day and by weekday versus weekend, then look for packet loss and slow hops. One snapshot can lie, but the pattern over time usually doesn't.
For ad verification and scraping, the work starts here. A path that's acceptable in off-peak hours may become unstable once the carrier or upstream route shifts. If the path changes mid-test, your percentiles stop describing one system and start describing several different ones.
Measuring Latency Through Mobile Proxies and 4G

A request can look fast from a datacenter and still feel slow once it leaves a mobile network. The ASN changes the picture before the packet reaches your target, because it shows which network owns the address and which upstream path you are really testing. Carrier-grade NAT changes it again, because a shared public IP can hide extra contention and make the same request behave differently from one run to the next.
That is why the benchmark has to stay pinned to one path. If you rotate the proxy IP while you collect samples, you stop measuring a single connection and start blending several routes into one set of percentiles. Keep the same sticky session through the full run, then repeat the test after rotation if you want to see how much the path itself changes. For a deeper setup note on mobile routing, this 4G LTE proxy guide is the clearest place to check the session behavior you need to hold steady.
What to hold constant during the test
- Keep the session stable: Do not rotate the IP while you collect latency samples. One change in route can shift the distribution enough to make the benchmark hard to read.
- Check the ASN first: Confirm whether the path sits in a mobile network, a residential path, or a datacenter path before you compare results.
- Use the same endpoint and the same timing window: Otherwise you mix network changes with workload changes, and the result stops being useful.
- Compare like with like: Run the same request from origin, then through a residential proxy, then through a mobile 4G proxy.
That last comparison is the one that maps closest to production behavior. A mobile path with a stable session gives you a cleaner view of what ad verification or scraping traffic will see, while a rotating session tells you more about churn than latency.
Why traceroute can look strange on 4G
A 4G route rarely looks like a clean enterprise path. Some hops never answer, some replies are rate-limited, and the public IP may sit behind a carrier edge instead of a single machine. Traceroute still helps, but treat it as a way to read the shape of the path, not as a perfect map of every hop.
The operational habit that holds up is simple. Benchmark three paths side by side, your origin network, the same request through a residential proxy, then the same request through a mobile 4G proxy. Keep the session fixed in each case, then compare p50, p95, p99, and max. That gives you a practical read on latency before production traffic does.
Common Pitfalls and a Checklist You Can Reuse
- Testing only on idle networks. The numbers can look clean on a quiet path and fall apart once real traffic shares the link. The issue is not the test itself, it is the network state during the test. Fix: repeat the run during busy periods and compare the shift in the distribution.
- Taking a single sample window. One short run can look conclusive while still being hard to repeat. The problem is timing noise and a path that changed under you. Fix: collect several windows and compare the spread, not just the headline number.
- Ignoring tail latency. A healthy average can hide the slow requests that users feel. The issue shows up in the far end of the distribution, not in the middle. Fix: read p95, p99, and max together, then decide whether the tail is acceptable.
- Rotating the proxy mid-test. If the session changes halfway through, the route changes with it and the percentiles stop meaning much. That is common on mobile paths with carrier-grade NAT and sticky session behavior, where one run may stay on one exit and the next may not. Fix: keep one sticky session for the full run.
- Measuring only the server. A slow DNS lookup or a delayed TLS handshake can get blamed on the backend even when the app is not the bottleneck. The timer has to separate connection setup, handshake time, and response time. Fix: split the request into those stages and record each one.
- Using averages for reporting. An average can flatten a bad user experience into a number that looks harmless. That hides the requests that fail a scrape, an ad-verification check, or a mobile QA flow. Fix: report the percentiles that match real requests and keep the raw max in view.
- Shutting down before in-flight requests finish. A run that ends too early can miss the slowest requests and make the benchmark look better than it is. The collection window is incomplete, so the max is understated. Fix: let the benchmark drain before you stop it.
For mobile-proxy and 4G workflows, the checklist is simple. Confirm the ASN and session behavior before you compare results, hold the endpoint and timing window steady, collect enough samples to see the tail, and verify that traceroute oddities are expected for the carrier path you are using. If you need a reference for 4G and LTE proxy behavior, use the wiki page you already keep for that setup, then test against your own baseline rather than assuming one path will behave like another.






