System Design

Core Concepts

Latency Numbers That Matter

There are only three ways to make anything faster, and almost all the time you are losing is not going into the one everybody optimises. Here are the numbers, and the four rules that decide what to do with them.

If you ask an engineer how fast their service is, you usually get one number: "about 40 milliseconds." It's almost always the average. The average is the one statistic that describes no real user's experience.

The number also rarely comes with a plan. Knowing that a request takes 40 milliseconds doesn't tell you what to do about it. So this article is built on one idea:

There are only three ways to make anything faster. Do less work, move it closer, or stop waiting. Every performance fix you'll ever ship is one of those three. A latency number is useful when it tells you which one you need. If it doesn't, it's trivia.

The next part surprises most people:

In almost every real system, waiting dominates. Distance comes second. Actual work is a distant third. Waiting means time in queues, time blocked on a lock, time holding a connection that's doing nothing, and time waiting for the slowest of fifty replies. None of it shows up in a CPU profiler, because the CPU isn't busy. So waiting is the largest term and the least measured one. That's why so much performance effort goes into the smallest term instead.

This article gives you the numbers worth knowing, grouped by which of the three they belong to. Then come four rules for how those numbers combine, and four budgets worked through end to end.


Why any of this matters

There are three things to settle before the tables.

Latency is a distribution, not a number

A service doesn't have one latency. It has a distribution of them, and different parts of that distribution answer different questions. A percentile names one point in it. The p99, for example, is the time that 99 percent of requests come in under.

  • The median (p50) tells you what a typical request felt like. It's useful for almost nothing else.
  • The average is misleading. A handful of very slow requests pull it to a value that describes neither the typical case nor the bad case. If someone quotes you an average latency, they haven't looked at their own data.
  • The p99 tells you what your unluckiest 1 percent got. At any real traffic level, that's a lot of people.
  • The p99.9 is where the rare failures show up: garbage collection pauses, a cold cache, a retry, one bad machine.
One service, many latencies
Most requests pile up on the left, so the median is 27 ms. A thin tail runs out to the right, too low to see on this scale, and it drags the average, in red, up to 40 ms. The p99 is 215 ms and the p99.9 is 425 ms, both far out in that tail.Most requests pile up on the left, so the median is 27 ms. A thin tail runs out to the right, too low to see on this scale, and it drags the average, in red, up to 40 ms. The p99 is 215 ms and the p99.9 is 425 ms, both far out in that tail.
The average sits where almost no request is. Most requests pile up on the left, so the median is 27 ms. A thin tail runs out to the right, too low to see on this scale, and it drags the average, in red, up to 40 ms. The p99 is 215 ms and the p99.9 is 425 ms, both far out in that tail.

The reason to care about the far tail is arithmetic. A service at 10,000 requests per second serves 864 million requests a day. So a p99.9 event happens 864,000 times a day. If each one belongs to a different person, close to a million people had a bad experience, and you still met a p99 target comfortably.

What humans and businesses actually notice

Latency is only worth money when someone is waiting for it. Jakob Nielsen's response time limits have held up for decades, and they're still the right reference points:

thresholdwhat happens
16 msone frame at 60 frames per second. Miss it and motion visibly stutters
100 msthe limit for feeling instantaneous, as if you touched the thing directly
1 secondthe limit for a person's train of thought to survive the wait
10 secondsthe limit for holding attention at all. Past this, people leave

Those thresholds have a price. Google commissioned a study with Deloitte across 37 retail and travel brands and more than 30 million user sessions. It found that a 0.1 second improvement in mobile load time raised retail conversions by 8.4 percent and average order value by 9.2 percent. Travel conversions rose 10.1 percent. A conversion is a visit that ends in a purchase or a booking. All of that came from one tenth of a second.

Keep that number in mind, because it turns latency into money. A round trip is the time for a message to reach the other end and for the reply to come back. A delay of 100 milliseconds is roughly one network round trip across a continent. It's also one avoidable TLS handshake, the setup step for an encrypted connection, or one N+1 query loop, where code runs one more query for each item in a list. Those are cheap engineering problems tied to expensive business outcomes.

Latency and throughput pull against each other

These two get treated as the same goal, and they're often opposites. Latency is how long one piece of work takes. Throughput is how much work gets done per second. Batching shows the conflict most clearly.

If you group ten writes into a single disk flush, you do one expensive operation instead of ten, so throughput goes up. But the first write in that batch now waits for the tenth to arrive, so its latency goes up. Every batching decision is this same trade. Database group commit is the mild form: commits that arrive while one flush runs share the next. A message producer's linger setting, which is how long it waits to fill a batch, works this way. So do Nagle's algorithm holding back a small packet, a gateway combining requests, and log lines buffered before a write.

Ten writes, one flush
The same ten writes, in blue, arrive over 48 ms. On the top line, each one gets its own flush, in teal, so nothing waits but the disk does ten flushes. On the bottom line, the writes are batched into one flush. The first write waits 48 ms for the tenth, shown in purple.The same ten writes, in blue, arrive over 48 ms. On the top line, each one gets its own flush, in teal, so nothing waits but the disk does ten flushes. On the bottom line, the writes are batched into one flush. The first write waits 48 ms for the tenth, shown in purple.
A batch raises throughput by making the first write wait. The same ten writes, in blue, arrive over 48 ms. On the top line, each one gets its own flush, in teal, so nothing waits but the disk does ten flushes. On the bottom line, the writes are batched into one flush. The first write waits 48 ms for the tenth, shown in purple.

The rule that follows is simple. Batch hard where nobody is waiting, and not at all where somebody is. A background pipeline should batch as much as memory allows. A request path should only batch requests that have already arrived. It should never wait for more to turn up.

This is also why "make it faster" is an unclear instruction. A team optimising throughput and a team optimising latency will make opposite choices about batch sizes, queue depths and utilisation targets. Both will be doing their jobs correctly. Find out which one you're being asked for before you start.


The numbers

Where latency comes from
Each band shows the range one source covers, on a time axis where every step is 1,000 times the last. Work, in teal, runs from 1 ns to about 20 ms. Distance, in blue, runs from 50 µs to 600 ms. Waiting, in purple, starts around 1 ms and has no upper limit. A CPU profiler only sees the teal band.Each band shows the range one source covers, on a time axis where every step is 1,000 times the last. Work, in teal, runs from 1 ns to about 20 ms. Distance, in blue, runs from 50 µs to 600 ms. Waiting, in purple, starts around 1 ms and has no upper limit. A CPU profiler only sees the teal band.
Waiting has no upper limit, and a profiler can't see it. Each band shows the range one source covers, on a time axis where every step is 1,000 times the last. Work, in teal, runs from 1 ns to about 20 ms. Distance, in blue, runs from 50 µs to 600 ms. Waiting, in purple, starts around 1 ms and has no upper limit. A CPU profiler only sees the teal band.

Work: what a machine does, and how long it takes

operationtime
L1 cache hit1 ns
branch mispredict3 to 5 ns
L2 cache hit4 ns
lock and unlock an uncontended mutex20 ns
L3 cache hit20 to 40 ns
read from main memory100 ns
small heap allocation50 to 100 ns
system call0.3 to 2 µs
context switch1 to 10 µs
compress 1 KB2 to 3 µs
SHA-256 of 1 KB1 to 2 µs
parse 1 KB of JSON5 to 10 µs
read 1 MB from memory50 to 100 µs
NVMe SSD, random 4 KB read20 to 100 µs
SATA SSD, random 4 KB read150 µs
NVMe SSD, read 1 MB300 to 400 µs
hard disk seek10 ms
hard disk, read 1 MB7 to 20 ms

You don't need to memorise every row. Take two things from it.

The whole table spans nanoseconds to milliseconds, and almost all of it is in the microsecond range or below. A request that spends 40 milliseconds on real computation is unusual. Most requests that take 40 milliseconds spend 2 of them working.

To make the table concrete, ask what fits inside one millisecond. In one millisecond you can do roughly 10,000 memory reads, or twenty random reads from an NVMe drive, or less than one hundredth of a round trip across the world. So a budget of 200 milliseconds is huge if you spend it computing, and almost nothing if you spend it on round trips. That gap is why the next two tables matter more than this one.

What fits in one millisecond
Each bar is how many of one operation fit in 1 ms, on an axis where every step is ten times the last. Memory reads, in teal, fit 10,000 times. NVMe reads fit about 20 times. Of a round trip across the world, in blue, less than one hundredth fits.Each bar is how many of one operation fit in 1 ms, on an axis where every step is ten times the last. Memory reads, in teal, fit 10,000 times. NVMe reads fit about 20 times. Of a round trip across the world, in blue, less than one hundredth fits.
A millisecond buys 10,000 memory reads and a sliver of a long round trip. Each bar is how many of one operation fit in 1 ms, on an axis where every step is ten times the last. Memory reads, in teal, fit 10,000 times. NVMe reads fit about 20 times. Of a round trip across the world, in blue, less than one hundredth fits.

The gap between a hard disk seek and an SSD read is a factor of 100 to 500. That one ratio explains most of the history of database design. B-trees, log-structured storage and sequential write patterns all exist because random access on spinning disks was extremely slow. On NVMe, random access is only somewhat slow, which is why newer designs make different choices.

One random read on three kinds of drive
The axis is linear, in milliseconds. The hard disk seek takes 10 ms. The SATA SSD read takes 150 µs and the NVMe read 20 to 100 µs, so both bars are thin lines on the axis. That gap of 100 to 500 times is what most storage engine design was built around.The axis is linear, in milliseconds. The hard disk seek takes 10 ms. The SATA SSD read takes 150 µs and the NVMe read 20 to 100 µs, so both bars are thin lines on the axis. That gap of 100 to 500 times is what most storage engine design was built around.
Next to a disk seek, an SSD read barely shows. The axis is linear, in milliseconds. The hard disk seek takes 10 ms. The SATA SSD read takes 150 µs and the NVMe read 20 to 100 µs, so both bars are thin lines on the axis. That gap of 100 to 500 times is what most storage engine design was built around.

Distance: what the network charges

hopround trip
same rack50 to 100 µs
same datacenter250 to 500 µs
across availability zones, one region0.5 to 2 ms
across regions, same continentunder 30 ms to a nearby region, about 70 ms across the US
across continents60 to 200 ms
Wi-Fi, first hop1 to 10 ms
5G, first hop10 to 30 ms
4G LTE, first hop30 to 70 ms
low earth orbit satellite25 to 60 ms
geostationary satelliteabout 600 ms
fibre, per 100 kmabout 1 ms

The last row is the one to memorise, because it's the only number here that engineering can't improve. Light in glass travels about 4.9 microseconds per kilometre. A round trip covers the distance twice, so every 100 km costs you roughly 1 millisecond. Real cables detour along railways and seabeds, so add about 40 percent to the map distance before you apply it.

Two rows need a closer look.

Cross-AZ hops aren't free, and they add up without anyone noticing. An availability zone (AZ) is a separate datacenter inside one cloud region. Half a millisecond sounds like nothing. But say a single request touches five services, and each makes two database calls that happen to land in another zone. That's ten crossings and five milliseconds of pure distance, spent inside one region, and nobody chose it.

The mobile first hop is the floor for anything a phone does. The first hop is the radio link from the phone into the mobile network, and the floor is the least time any request can take. A 4G radio adds 30 to 70 milliseconds before your packet has left the neighbourhood. You can put a server in every city on earth and you still won't get under it. For mobile-first products, this changes the ranking of every optimisation you were considering.

Connections: what you pay before any data moves

This is where distance turns into waiting, and it's the most often ignored table of the three.

stepcost
DNS lookup, cached0
DNS lookup, uncached20 to 120 ms
TCP handshake1 round trip
TLS 1.2 handshake2 round trips
TLS 1.3 handshake1 round trip
TLS 1.3 resumption, 0-RTT0 round trips
QUIC or HTTP/3, first connection1 round trip, TCP and TLS combined
reusing a connection you already have0 round trips

If you add them up for one request, you get the most useful fact about network latency.

A cold HTTPS request against a warm one
Both requests run over a 50 ms round trip and do the same 20 ms of server work, in teal. The cold one first spends 40 ms on DNS and then a round trip each on the TCP and TLS handshakes, in blue, before it sends the request, for 210 ms in all. The warm one reuses an open connection and takes 70 ms.Both requests run over a 50 ms round trip and do the same 20 ms of server work, in teal. The cold one first spends 40 ms on DNS and then a round trip each on the TCP and TLS handshakes, in blue, before it sends the request, for 210 ms in all. The warm one reuses an open connection and takes 70 ms.
A cold request pays three round trips, and a warm one pays one. Both requests run over a 50 ms round trip and do the same 20 ms of server work, in teal. The cold one first spends 40 ms on DNS and then a round trip each on the TCP and TLS handshakes, in blue, before it sends the request, for 210 ms in all. The warm one reuses an open connection and takes 70 ms.

A cold HTTPS request costs three round trips, plus DNS, before the first byte of the response comes back. One is for TCP, one for TLS 1.3, and one for the request itself. A warm request, on a connection that's already open, costs one. Take a 50 millisecond link, a 40 millisecond DNS lookup and 20 milliseconds of server work. The cold request takes 210 milliseconds and the warm one takes 70. Your server code is identical in both cases.

This is why connection pooling and keep-alive cut more real latency than most query tuning ever will. Keep-alive means keeping a connection open between requests, and a pool is a set of open connections that requests share. It's also why the first thing to check on a slow client is whether it opens a fresh connection every time. And it's the strongest practical argument for HTTP/3, which folds the transport and encryption handshakes into a single round trip.


The method: build a budget, then attribute every millisecond

Building a latency budget
Steps (1) to (6) run left to right, in two rows. At step (3), each hop gets a label: work in teal, distance in blue, waiting in purple. Each label leads to its own fix at step (6). The check at the end asks whether removing the largest term would meet the target. If it wouldn't, the architecture is wrong.Steps (1) to (6) run left to right, in two rows. At step (3), each hop gets a label: work in teal, distance in blue, waiting in purple. Each label leads to its own fix at step (6). The check at the end asks whether removing the largest term would meet the target. If it wouldn't, the architecture is wrong.
The label on each hop picks the fix. Steps (1) to (6) run left to right, in two rows. At step (3), each hop gets a label: work in teal, distance in blue, waiting in purple. Each label leads to its own fix at step (6). The check at the end asks whether removing the largest term would meet the target. If it wouldn't, the architecture is wrong.

There are six steps.

1. State the target as a percentile, not a number. "Under 200 milliseconds" is not a target. "p99 under 200 milliseconds, measured at the client" is. Where you measure matters as much as the number, because a server-side measurement leaves out exactly the parts that are usually largest.

2. List every hop the request makes. Include all of them, even the ones inside your own network: cross-AZ calls, cache lookups, the auth check you forgot about, the logging write.

3. Label each hop: work, distance or waiting. People skip this step, and it's the one that decides your fix. Better code can't speed up a hop that is distance. A faster machine can't speed up a hop that is waiting.

4. Write a realistic p99 next to each hop, not a typical value. Your budget is for the tail, so fill it with tail numbers. The total will look alarming, and that's the useful version.

5. Find the term that dominates. There's almost always one, and it's almost always larger than everything else combined.

6. Apply the move that matches the term. For work, do less of it. For distance, move it closer. For waiting, remove the block.

Then run one last check: if you removed the largest term completely, would you meet the target? If not, you have the wrong architecture, and no amount of tuning will fix it. It's better to find that out in 5 minutes than after a quarter of optimisation.

Naive

Profile the code and speed up the hottest function

You open a profiler, find the function at the top, and make it faster. You'll always find something, and you'll often make it 30 percent quicker. The request won't get measurably faster.

This isn't bad luck. It follows from what a profiler measures. A profiler tells you where CPU time goes, and CPU time is the smallest of the three terms in almost every request. Say a function is three percent of the budget and you make it a third faster. The total improves by 1 percent, which is inside the noise. Meanwhile, the 70 percent of the time spent waiting is invisible to the profiler. During all of it the CPU was idle, so there was nothing to sample.

Senior

Build the budget first, then attack the term that dominates

Do the six steps. List the hops, label each one work, distance or waiting, put a p99 next to each, and find the big one. Then apply the matching move.

This is correct, and it's most of the value in this article. It also usually gives an uncomfortable answer, because the dominant term is often owned by somebody else. It might be the client's connection handling, the network layout, or a utilisation target set by whoever sizes the fleet. The useful outcome is to point at the number and say "this is where the time is, and it isn't in our code," even when that's awkward.

Staff

Check the measurement and the target before touching the system

Ask two questions before any work gets scoped.

Is the number real? Where was it measured? How was the percentile calculated? Does the load test that produced it wait for each response before sending the next? Any of those can be wrong by enough to aim the whole project at the wrong term.

Is the target right? Does the product need p99 under 200 milliseconds, or did someone pick a round number? A target tighter than the product needs will use up unlimited engineering time. A target looser than users notice will let a real problem sit.

Both questions have ended optimisation projects before they began. That's the cheapest possible outcome.


Four rules that decide everything

The numbers above are inputs. These four rules decide how they combine, and most of the surprises come from them.

1. Percentiles do not add

Say a request passes through 10 steps, one after another, and each step is slow 1 percent of the time. The request avoids every slow step only 0.99 to the power of ten of the time, which is 90.4 percent. So roughly one request in ten hits a slow step, and each step's p99 now sets your overall p90.

Chance a request hits at least one slow step
The red curve is 1 − 0.99^N, for steps that are each slow 1 percent of the time. At 10 steps, 9.6 percent of requests hit a slow one. At 30 it's 26 percent, and at 50 it's 39.5 percent. The same curve holds for calls made in parallel, which is rule 4.The red curve is 1 − 0.99^N, for steps that are each slow 1 percent of the time. At 10 steps, 9.6 percent of requests hit a slow one. At 30 it's 26 percent, and at 50 it's 39.5 percent. The same curve holds for calls made in parallel, which is rule 4.
Rare for each step becomes common for the request. The red curve is 1 − 0.99^N, for steps that are each slow 1 percent of the time. At 10 steps, 9.6 percent of requests hit a slow one. At 30 it's 26 percent, and at 50 it's 39.5 percent. The same curve holds for calls made in parallel, which is rule 4.

If you turn that around, you get a more useful design rule:

Back of envelopeWhat a chain demands from each link
For the whole chain to hit p99, each of N steps must be
fast with probability 0.99^(1/N):

  N =   1 step    →  99%      (2 nines)
  N =  10 steps   →  99.9%    (3 nines)
  N = 100 steps   →  99.99%   (4 nines)
  ─────────────────────────────────────────────────
  Every 10× more steps costs each step one more nine.

This rule limits how finely you can split a system into services. A request that touches thirty microservices needs every one of them faster than p99.9, forever. That includes the ones owned by a team that's on holiday. It's a real architectural constraint, and it rarely comes up when teams discuss microservices.

The practical response is to reduce the number of steps on the critical path, the chain of steps the response has to wait for. Where you can't, make the steps run at the same time instead of one after another. Two calls in parallel cost you the slower of the two rather than the sum. The addition becomes a maximum.

2. Queues explode near saturation

Of the four rules, this one matters most, and the fewest people know it.

When work arrives at random and a server is busy, new arrivals wait. The wait doesn't grow gently as the server gets busier. It stays low for a long way and then turns sharply upward, like a hockey stick, and the bend comes sooner than most people expect.

Response time against how busy the server is
The curve is response time as a multiple of the actual work. It stays under 3.3 times up to 70 percent busy, in green. At 90 percent it reaches 10 times, so a 20 ms task takes 200 ms, and at 95 percent it reaches 20 times. Nothing is broken at any point on the curve.The curve is response time as a multiple of the actual work. It stays under 3.3 times up to 70 percent busy, in green. At 90 percent it reaches 10 times, so a 20 ms task takes 200 ms, and at 95 percent it reaches 20 times. Nothing is broken at any point on the curve.
Past about 70 percent busy, the wait climbs steeply. The curve is response time as a multiple of the actual work. It stays under 3.3 times up to 70 percent busy, in green. At 90 percent it reaches 10 times, so a 20 ms task takes 200 ms, and at 95 percent it reaches 20 times. Nothing is broken at any point on the curve.

In the simplest queueing model, the total time a request takes is its service time divided by one minus utilisation. Service time is the time spent on actual work, with no waiting. Utilisation is the fraction of time the server is busy.

Back of envelopeWhat utilisation costs you
  response time  =  service time / (1 − utilisation)

  at 50% busy    →   2 × service time
  at 70% busy    →   3.3 ×
  at 80% busy    →   5 ×
  at 90% busy    →  10 ×
  at 95% busy    →  20 ×
  at 99% busy    → 100 ×
  ─────────────────────────────────────────────────
  A 20 ms task takes 200 ms to come back at 90% busy.
  Nothing is broken. The machine is just busy.

The model assumes random arrivals and a single server, and real systems differ in the details. The shape doesn't change. Every queue behaves like this, whether it's a CPU run queue, a thread pool, a connection pool, a disk or a lock.

Two conclusions follow, and both are the opposite of what teams usually do.

You can't run a latency-sensitive service at high utilisation. Running at 90 percent looks like good use of your budget. But it makes response time ten times what it would be on an idle machine. And it leaves you no room when traffic rises.

Buying headroom is often cheaper than optimising. Headroom is spare capacity. Going from 90 percent utilisation to 70 percent needs about 29 percent more machines, and it cuts response time by a factor of three. Getting the same factor of three by making the code faster takes a quarter of engineering time, and the gain doesn't survive the next feature.

3. Concurrency is arrival rate times latency

Little's Law is the only formula here with no assumptions attached. It holds for any stable system, whatever the pattern of arrivals or service times:

requests in flight  =  arrival rate  ×  time each one takes

L = λ W
A pool of 50 connections, each held for 100 ms
1,000 requests a second arrive, and each one holds a connection for 100 ms, so 100 would need to be in flight. The pool has 50 slots, all busy, so only 500 a second get through. The rest wait in the purple queue, which keeps growing. Server metrics start after the pool, so they never see that wait.1,000 requests a second arrive, and each one holds a connection for 100 ms, so 100 would need to be in flight. The pool has 50 slots, all busy, so only 500 a second get through. The rest wait in the purple queue, which keeps growing. Server metrics start after the pool, so they never see that wait.
The pool caps throughput at 500 a second, whatever the CPU. 1,000 requests a second arrive, and each one holds a connection for 100 ms, so 100 would need to be in flight. The pool has 50 slots, all busy, so only 500 a second get through. The rest wait in the purple queue, which keeps growing. Server metrics start after the pool, so they never see that wait.

It looks trivial, so it's easy to underrate. In practice you'll use it more often than anything else here.

Read forwards, it sizes your pools. A service handling 1,000 requests per second, each taking 100 milliseconds, always has 100 requests in flight. So it needs at least 100 threads or connections. If you give it 50, it can only finish 500 requests a second. The rest queue for a free slot before they do anything, and the queue keeps growing. That waiting time appears nowhere in your server-side metrics.

Read backwards, it explains a throughput ceiling. Take a connection pool of 50, where each request holds a connection for 100 milliseconds. That caps you at 500 requests per second. Adding CPU changes nothing. Adding machines changes nothing if they share the pool. The only fixes are a bigger pool or a shorter hold time.

Read as a warning, it explains why slowness spreads. If latency doubles and the arrival rate stays the same, the number of requests in flight doubles. If your pool can't hold them, requests start queueing. Queueing raises latency, which raises the number in flight again. This feedback loop turns a small backend slowdown into a total outage, and it's why timeouts exist.

4. Waiting for many turns rare into normal

If a request has to collect answers from many places before it can reply, it's as slow as the slowest of them. One request calling many backends at once is called fanout.

Say there are 50 backends, each slow 1 percent of the time. The chance that a request avoids every slow one is 0.99 to the power of 50, which is 60.5 percent. So 39 percent of requests are slow, even though every backend is meeting its target and nothing is broken.

A hedged request
On the top line, the request goes to replica A, which happens to be slow, and the client waits 180 ms. On the bottom line, the client sends a copy to replica B once 15 ms have passed with no answer. B answers at 40 ms, in green, and A's work is dropped. The timings are an example.On the top line, the request goes to replica A, which happens to be slow, and the client waits 180 ms. On the bottom line, the client sends a copy to replica B once 15 ms have passed with no answer. B answers at 40 ms, in green, and A's work is dropped. The timings are an example.
A second copy, sent only when the first is late, cuts the wait. On the top line, the request goes to replica A, which happens to be slow, and the client waits 180 ms. On the bottom line, the client sends a copy to replica B once 15 ms have passed with no answer. B answers at 40 ms, in green, and A's work is dropped. The timings are an example.

The most effective fix is a hedged request. A replica is another copy of the same backend. After waiting about as long as a typical request should take, you send a duplicate to a different replica and use whichever answer comes back first. It sounds wasteful, but it costs very little, because you only hedge the small fraction of requests that are already running late.

Dean and Barroso measured this on a Google benchmark that read 1,000 keys from a BigTable spread across 100 servers. Sending a hedge after a 10 millisecond delay cut the 99.9th percentile for the whole operation from 1,800 milliseconds to 74 milliseconds, while issuing only 2 percent more requests. That's a factor of 24 on the tail for 2 percent more load.

Naive

Raise the timeout so slow requests eventually succeed

The request was failing at 200 milliseconds, so you allow it 5 seconds and now it succeeds. The problem looks solved.

It's the wrong direction, and Little's Law says why. A longer timeout means slow requests hold a slot for longer. The number in flight rises and the pool fills. Then requests that would have been fine start queueing behind the slow ones. You've turned a fast failure for a few requests into a slow success for all of them. This is the most common way a small backend problem becomes a full outage.

Senior

Hedge, and retry with backoff, jitter and a budget

Send a duplicate to another replica for requests that pass a delay threshold. Retry real failures with exponential backoff, which doubles the wait after each failure, and with random jitter, which adds a random amount to each wait. Cap the attempts. Put a budget on retries so they can never exceed a small fraction of normal traffic.

This is correct, and you should name its cost. You're adding load to a system that's already struggling, so every one of these mechanisms needs a limit. A retry policy with no limit sends extra load at your own system at the moment it can least take it.

Staff

Make the tail structurally unable to form

Hedging treats the symptom well. The stronger move is to remove the conditions that create a tail in the first place.

Cut the fanout. Fifty parallel calls usually means the composition happened by accident rather than by design. Twenty calls give different arithmetic: 1 minus 0.99 to the twentieth is 18 percent rather than 39.

Return a partial answer. Decide in advance which parts of the response are optional, and send the response without them when a contributor is late. A page missing one panel is almost always better than a page that's 2 seconds slow. This is a product decision, and it has to be made before the incident.

Run at a utilisation where queues don't build. Much of what people treat as an unavoidable tail is queueing delay they chose by provisioning tightly.

A tail you designed out costs nothing to serve. A tail you hedge around costs a few percent of extra load, forever.


How to measure it without fooling yourself

Everything above assumes your latency numbers are real. Very often they aren't. They go wrong in three ways, and all three are systematic rather than random. That's the dangerous kind, because a systematic error doesn't average out with more data. More data only makes the wrong number look more certain.

Your load test is probably hiding the tail

Gil Tene named this failure coordinated omission.

Picture a load generator written the obvious way: send a request, wait for the response, send the next one. Now suppose the system stalls for one second.

Back of envelopeWhat a send-and-wait load test misses
Intended load: 100 requests/sec.
The system stalls for 1 second.

What real users experience
  100 requests arrive during that second
  the first one waits              1000 ms
  the last one waits                 10 ms
  average of the affected            ~500 ms
  ─────────────────────────────────────────────────
  100 bad experiences

What a send-and-wait generator records
  it was inside one slow request the whole time
  so it records                    1 sample at 1000 ms
  then carries on as if nothing happened
  ─────────────────────────────────────────────────
  1 bad sample instead of 100

It captured 1% of the damage. Every percentile past
p99.9 is now fiction.

The name describes it exactly. The test loop and the system coordinate to omit the very samples that mattered. While the server is stuck, the generator stops asking, so the queue that would form in production never forms in the test. The generator measures service time and reports it as response time, which should include the wait. Those two are the same number only when nothing is ever queued.

A one second stall, seen two ways
Both lines run at 100 requests a second, and the system stalls for one second, shaded red. Real users keep arriving during the stall, and each one waits until it ends, from 1,000 ms for the first down to 10 ms for the last. The send-and-wait generator is stuck inside one request, so it records a single slow sample.Both lines run at 100 requests a second, and the system stalls for one second, shaded red. Real users keep arriving during the stall, and each one waits until it ends, from 1,000 ms for the first down to 10 ms for the last. The send-and-wait generator is stuck inside one request, so it records a single slow sample.
The test stops asking during the stall, so it records 1 slow request instead of 100. Both lines run at 100 requests a second, and the system stalls for one second, shaded red. Real users keep arriving during the stall, and each one waits until it ends, from 1,000 ms for the first down to 10 ms for the last. The send-and-wait generator is stuck inside one request, so it records a single slow sample.

The same bug appears in production monitoring. It happens with any agent that backs off when things get slow, and any metrics pipeline that drops samples under load. It also happens with any client that has a circuit breaker, a switch that stops calls to a failing service, in front of the thing it measures. Each of these under-reports exactly the events you built the dashboard to catch.

The fixes are known. Keep sending at the intended rate whether or not answers come back, so a stall builds a backlog the way it would in real life. Record the time from when a request should have been sent, not from when you got round to sending it. And use a histogram library that can correct for the omission afterwards. HdrHistogram was built for this.

You cannot average percentiles

This one is arithmetic, and it breaks a lot of dashboards.

Back of envelopeTen servers, one of them dying
10 servers, equal share of traffic.
  9 healthy servers, each p99      =  50 ms
  1 sick server, every request     = 900 ms

The dashboard averages the reported p99s
  (9 × 50 + 900) / 10              = 135 ms
  looks like a mild degradation

The truth
  the sick server takes 10% of all traffic
  and 100% of that traffic is 900 ms
  so the worst 10% of the fleet is at 900 ms
  fleet p99                        = 900 ms
  ─────────────────────────────────────────────────
  Off by nearly 7×, and it hides a total failure
  of one tenth of your capacity.

A percentile isn't a quantity you can add or average. The mean of ten p99 values is not the p99 of the combined traffic, and no correction factor makes it one. A histogram counts how many requests fell into each latency range. The only correct way to get a fleet percentile is to export histograms from each server and merge the histograms. Then you read the percentile off the merged result.

This matters more as you add servers. The more you have, the more completely averaging hides a single bad one. It's also why "our p99 looks fine but customers are complaining" is such a common situation, and such a solvable one.

Measure where the person is

A server-side measurement starts when your framework hands you a request and ends when you hand back a response. That leaves out DNS, connection setup, TLS and the network in both directions. It also leaves out time queued in the load balancer, time queued in your own accept backlog, and time spent waiting for a thread. The accept backlog is the queue of new connections the kernel holds until your server accepts them.

What a server-side measurement sees
One request, from the phone to the handler and back. Distance is blue, waiting is purple and work is teal. The server-side metric covers only the teal handler. Everything before it, from DNS to the wait for a thread, and the trip back, shows up only in a measurement taken at the client.One request, from the phone to the handler and back. Distance is blue, waiting is purple and work is teal. The server-side metric covers only the teal handler. Everything before it, from DNS to the wait for a thread, and the trip back, shows up only in a measurement taken at the client.
The server's clock starts after most of the wait is over. One request, from the phone to the handler and back. Distance is blue, waiting is purple and work is teal. The server-side metric covers only the teal handler. Everything before it, from DNS to the wait for a thread, and the trip back, shows up only in a measurement taken at the client.

The mobile example later in this article has a server reporting 20 milliseconds for something the user waited 390 milliseconds for. The server isn't lying. It's answering a different question.

So always state the measurement point along with the number. "p99 of 200 ms, measured at the client" is a target. "p99 of 200 ms" invites someone to optimise the wrong thing. If you can only measure in one place, measure as close to the person as you can. Every layer you move inward drops a term you can't afford to ignore.


Four budgets, worked through

Across all four, not one is fixed by writing faster code.

1. A mobile API call: where did 390 milliseconds go?

A user in a large city taps a button. The app calls an API 2,000 km away over 4G. Server-side metrics say the request took 20 milliseconds. The user waited much longer.

Where 390 ms goes on a cold mobile call
The top bar is the cold call. The radio wakes up first, in purple, then DNS and three round trips of 70 ms each, in blue. The server's 20 ms, in teal, comes last. The bottom bar is the same call on a connection that's already open, at 90 ms. Server metrics report 20 ms for both bars.The top bar is the cold call. The radio wakes up first, in purple, then DNS and three round trips of 70 ms each, in blue. The server's 20 ms, in teal, comes last. The bottom bar is the same call on a connection that's already open, at 90 ms. Server metrics report 20 ms for both bars.
The server is 5 percent of the wait. The top bar is the cold call. The radio wakes up first, in purple, then DNS and three round trips of 70 ms each, in blue. The server's 20 ms, in teal, comes last. The bottom bar is the same call on a connection that's already open, at 90 ms. Server metrics report 20 ms for both bars.
Back of envelopeA cold mobile request, hop by hop
Round trip on this path
  4G first hop            50 ms
  2,000 km of fibre       20 ms
  ─────────────────────────────
  one round trip          70 ms

Cold request
  radio wakes from idle  100 ms   (assumption; varies a lot)
  DNS, not cached         60 ms
  TCP handshake           70 ms   (1 round trip)
  TLS 1.3 handshake       70 ms   (1 round trip)
  request and response    70 ms   (1 round trip)
  server work             20 ms
  ─────────────────────────────
  total                  390 ms   server share: 5%

Warm request, connection already open
  request and response    70 ms
  server work             20 ms
  ─────────────────────────────
  total                   90 ms

The radio wake-up figure is the softest input here. It varies a lot with the network and the state of the device, so treat it as an assumption, not a fact. Everything else is solid, and the conclusion holds even if you delete the radio line entirely.

The server is 5 percent of the experience. Taking it from 20 milliseconds to 10 would improve the total by 2.6 percent, and that's usually where all the effort goes.

Three changes work, listed from the biggest gain down.

  • Keep the connection open. That takes 390 down to 90, and it's a client configuration change.
  • Pre-warm on app launch, so the first real request finds a live connection and an awake radio, rather than paying for both.
  • Move the endpoint closer. A point of presence (PoP) is a server site placed near the users. If you put one 200 km away instead of 2,000, the fibre part of the round trip drops from 20 ms to 2, and the round trip drops from 70 to 52. That helps, but it's now a small win, because the 4G access hop dominates what's left. On mobile, the radio network is the floor, and no amount of edge deployment gets under it.

2. The service that will not go past 500 requests per second

A service won't go past 500 requests per second. CPU sits at 30 percent. The team doubles the instance count, and nothing changes.

Back of envelopeLittle's Law finds it in one line
  connection pool size        =  50
  time holding a connection   =  100 ms

  L = λ W  →  50 = λ × 0.1
  λ = 500 requests/sec        ← the ceiling, exactly

To reach 2,000/sec, one of these must change:
  pool of 200 connections, or
  hold time down to 25 ms, or
  some combination of the two.

Adding CPU changes nothing. CPU was never the limit.

This kind of incident is very common, and it's hard to see from monitoring, because the waiting happens on the client side of the pool. The server reports healthy latency for every request it receives, because the queued ones haven't arrived yet. Any time throughput is flat while CPU is low, apply Little's Law to every pool in the path.

3. The service running at 90 percent

A service does 20 milliseconds of real work per request. It's provisioned to run at 90 percent utilisation, and the team is proud of that.

Back of envelopeThe cost of being efficient
  service time                   20 ms
  at 90% utilisation
    20 / (1 − 0.90)            = 200 ms

  at 70% utilisation
    20 / (1 − 0.70)            =  67 ms
  at 50% utilisation
    20 / (1 − 0.50)            =  40 ms
  ─────────────────────────────────────────────────
  Moving 90% → 70% is 3× faster
  and needs about 29% more machines.

That's three times faster for 29 percent more hardware, and you can have it this afternoon. The alternative is making the code three times faster. That takes a quarter of engineering work, and the gain shrinks as new features land.

There's a second benefit that the arithmetic doesn't show. A service at 90 percent has no room to absorb a traffic spike. So the same event that adds load also pushes you up the steep part of the curve. The tail gets worse exactly when demand gets higher, which is the worst time for it to happen.

4. A fanout of fifty

A page builds its content from 50 backend services, called in parallel. Each one is well behaved: p50 of 10 milliseconds, p99 of 100 milliseconds.

Back of envelopeWell-behaved parts, badly behaved whole
  P(a given call is fast)         = 0.99
  P(all 50 are fast)              = 0.99^50 = 0.605
  P(at least one is slow)         = 39.5%
  ─────────────────────────────────────────────────
  So 39.5% of page loads take 100 ms or more,
  even though 99% of individual calls take under 100 ms.

  Every backend is meeting its target.
  Nothing is broken. The page is slow anyway.

There are three responses, cheapest first. Cut the fanout, because 50 calls usually means the composition happened by accident rather than by design. Return a partial page and fill in late arrivals, if the product can live with it. Hedge: send a duplicate to another replica for the small fraction of calls that pass a delay threshold.

None of the four examples needed a faster algorithm. One was distance and handshakes, and three were waiting.


Where the milliseconds actually hide

These are eight places where the time goes, roughly in order of how often each one turns out to be the answer.

1. The connection you keep reopening

This comes first because it's the most common cause in practice. Check whether your client uses a connection pool, and whether the pool is large enough for the concurrency Little's Law predicts. Then check whether keep-alive survives your load balancer's idle timeout. If the pool keeps idle connections longer than the load balancer does, the pool hands out connections the load balancer has already closed. Each one costs a full reconnect plus a failure.

There's a less obvious version too. TLS session resumption only works if the node you reconnect to recognises your session. Session resumption lets a returning client skip most of the TLS handshake by presenting a ticket from its earlier session. If your load balancer spreads requests across nodes that don't share session tickets, every reconnect is a full handshake, even though the client did everything right.

2. Garbage collection and other stop-the-world pauses

A stop-the-world pause halts every application thread, usually so the runtime can collect garbage. A 200 millisecond pause makes every in-flight request 200 milliseconds slower at the same moment. This is why tail latency on garbage-collected runtimes, like the JVM, is often bimodal, meaning it has two separate clusters. Most requests are fine, and a group of them are slow together.

Request latency over time, with two pauses
Each dot is one request. Most finish in 10 to 40 ms. At each of the two 200 ms pauses, every request in flight is delayed together, so the slow ones, in red, stand in a column instead of being spread out. The pause times and request times are assumed.Each dot is one request. Most finish in 10 to 40 ms. At each of the two 200 ms pauses, every request in flight is delayed together, so the slow ones, in red, stand in a column instead of being spread out. The pause times and request times are assumed.
A pause slows every in-flight request at once. Each dot is one request. Most finish in 10 to 40 ms. At each of the two 200 ms pauses, every request in flight is delayed together, so the slow ones, in red, stand in a column instead of being spread out. The pause times and request times are assumed.

You can recognise it in two ways. Your p99.9 is many times your p99, not just a little above it. And the slow requests arrive in bursts rather than spread out. Check slow requests against the pause logs before you look anywhere else.

3. The N+1 query

A loop of 200 sequential queries at 2 milliseconds each takes 400 milliseconds, and each query looks healthy in the database's own metrics. This is the purest form of the rule that steps in sequence add up. It's still one of the most common causes of slow pages anywhere.

The fix is to make it one query, or one batch. The general habit is to count round trips rather than optimise them. A round trip you removed is faster than any round trip you tuned.

4. Nagle's algorithm meeting delayed acknowledgements

This one is old, obscure, and still real. TCP has two optimisations that each make sense alone. Nagle's algorithm holds back a small outgoing packet, waiting to combine it with more data. Delayed acknowledgement holds back an incoming acknowledgement, waiting to combine it with a reply.

When both are on, each side waits for the other. The deadlock breaks when the delayed-acknowledgement timer expires, which is typically tens of milliseconds later. The symptom is a suspiciously round delay on small writes, and no profiler explains it. Setting TCP_NODELAY turns Nagle's algorithm off, and it's the standard fix. Most modern frameworks set it for you, but not all of them.

Nagle's algorithm meets delayed acknowledgement
The client sends a request in two small writes. The first goes out (1). Nagle's algorithm holds the second until the first is acknowledged (2). The server can't reply to half a request, so it holds the acknowledgement, waiting for a reply to attach it to (3). Both wait, in purple, until the delayed-acknowledgement timer fires (4).The client sends a request in two small writes. The first goes out (1). Nagle's algorithm holds the second until the first is acknowledged (2). The server can't reply to half a request, so it holds the acknowledgement, waiting for a reply to attach it to (3). Both wait, in purple, until the delayed-acknowledgement timer fires (4).
Each side waits for the other until a timer fires. The client sends a request in two small writes. The first goes out (1). Nagle's algorithm holds the second until the first is acknowledged (2). The server can't reply to half a request, so it holds the acknowledgement, waiting for a reply to attach it to (3). Both wait, in purple, until the delayed-acknowledgement timer fires (4).

5. Head-of-line blocking

In HTTP/1.1, responses come back in order, so one slow response blocks everything queued behind it on that connection. This is head-of-line blocking. HTTP/2 fixed this at the application layer by multiplexing, which means sending many requests at once over one connection as separate streams. But TCP still delivers bytes in order. So a single lost packet stalls every stream on the connection while it's resent.

That remaining problem is why HTTP/3 exists and runs over QUIC instead of TCP. With QUIC, the other streams keep flowing while one recovers from a lost packet. On a lossy mobile network, this makes a large difference in practice.

One lost packet, two transports
Three streams share one connection, and one packet of stream A is lost, marked with a red cross. Over TCP, streams B and C stop too, in purple, until the packet is resent, because TCP hands bytes over strictly in order. Over QUIC, B and C keep going, in green, and only A waits.Three streams share one connection, and one packet of stream A is lost, marked with a red cross. Over TCP, streams B and C stop too, in purple, until the packet is resent, because TCP hands bytes over strictly in order. Over QUIC, B and C keep going, in green, and only A waits.
Over TCP a lost packet stalls every stream, and over QUIC only its own. Three streams share one connection, and one packet of stream A is lost, marked with a red cross. Over TCP, streams B and C stop too, in purple, until the packet is resent, because TCP hands bytes over strictly in order. Over QUIC, B and C keep going, in green, and only A waits.

6. Retries without jitter

A retry adds load at the exact moment the system is least able to take it. Retries set off by the same event also fire at the same moment. So they arrive as one synchronised wave instead of spread out.

The rules are exponential backoff, random jitter on every delay, a cap on total attempts, and a budget so retries can never exceed a small fraction of normal traffic. Without the budget, your own clients can turn a partial outage into a full one.

7. Timeouts chosen from round numbers

A timeout is a latency decision, and most timeouts are 30 seconds only because that was the default.

Little's Law tells you what a default like that costs. Take a service handling 1,000 requests per second, with a 30 second timeout, whose backend stalls completely. It will build up 30,000 requests in flight before the first one gives up. Your thread pool isn't 30,000. So instead of shedding load, rejecting what it can't handle and staying up, the service uses up every resource it has and falls over. Returning errors would have been a much better outcome.

Requests in flight after the backend stalls
The backend stops answering at 0 seconds. With 1,000 requests arriving each second and none finishing, the red line climbs until the first timeout fires at 30 seconds, with 30,000 in flight. The thread pool, assumed here at 200, is the thin line along the bottom, and it is full a fifth of a second after the stall begins.The backend stops answering at 0 seconds. With 1,000 requests arriving each second and none finishing, the red line climbs until the first timeout fires at 30 seconds, with 30,000 in flight. The thread pool, assumed here at 200, is the thin line along the bottom, and it is full a fifth of a second after the stall begins.
A 30 second timeout lets 30,000 requests pile up. The backend stops answering at 0 seconds. With 1,000 requests arriving each second and none finishing, the red line climbs until the first timeout fires at 30 seconds, with 30,000 in flight. The thread pool, assumed here at 200, is the thin line along the bottom, and it is full a fifth of a second after the stall begins.

Pick the timeout from the distribution instead. About two to three times your measured p99 is a sensible starting point. That's long enough for normal slow requests to succeed, and short enough to contain a stall. Then check the number against Little's Law, and confirm your pools can hold the in-flight count it allows.

The second half of this is deadline propagation, and it decides whether a system degrades or collapses. A request should carry how much time is left in the user's budget. Every downstream call then gets the remainder, instead of a fresh timeout of its own. Say the user has already waited 180 milliseconds of a 200 millisecond budget. A downstream service shouldn't start a 500 millisecond operation. It should refuse straight away, because any work that finishes after the caller has given up is work nobody will ever see. gRPC carries deadlines natively. Over plain HTTP, you need a header convention, and every service has to honour it.

Passing the deadline down the chain
The user allows 200 ms. On the top line, every call gets its own fresh timeout, so service C starts a 500 ms operation that ends long after the user has gone, shown in grey. On the bottom line, the remaining time travels with the request. C sees 20 ms left, knows it can't finish, and refuses at once, in green.The user allows 200 ms. On the top line, every call gets its own fresh timeout, so service C starts a 500 ms operation that ends long after the user has gone, shown in grey. On the bottom line, the remaining time travels with the request. C sees 20 ms left, knows it can't finish, and refuses at once, in green.
Each call gets what's left of the user's budget, not a fresh timeout. The user allows 200 ms. On the top line, every call gets its own fresh timeout, so service C starts a 500 ms operation that ends long after the user has gone, shown in grey. On the bottom line, the remaining time travels with the request. C sees 20 ms left, knows it can't finish, and refuses at once, in green.

8. Work you put on the request path without noticing

Logging can be synchronous, writing to disk or to a network collector before the response goes out. Metrics can carry high-cardinality labels, which are labels with many distinct values such as a user ID, and get serialised on every request. An audit write can block the response. A feature flag lookup can miss its cache and call a service.

Each one is small, and all of them run on every request. Make a habit of asking what happens between your handler returning and the bytes reaching the socket. This kind of work builds up there, and no team owns it.


If you memorise nothing else

Do less, move it closer, or stop waitingthere is no fourth option
Waiting is the biggest termand no profiler will show it to you
100 km costs 1 ms of round tripthe only number engineering cannot beat
A cold HTTPS request costs 3 round tripsa warm one costs 1
Mobile's first hop is 30 to 70 msthat is the floor for anything a phone does
Response time = service time / (1 − utilisation)90 percent busy means 10× slower
Requests in flight = rate × latencyLittle's Law sizes every pool you own
10× more steps costs each step one more ninea 10-step chain needs p99.9 everywhere
50 parallel calls at p99 = 39 percent slow requestsfanout turns rare into normal
Hedging cut a p99.9 from 1,800 ms to 74 msfor 2 percent more load
100 ms feels instant, 1 s breaks concentrationNielsen's limits still hold
0.1 s faster raised retail conversions 8.4 percentlatency is a revenue number
You cannot average percentilesmerge histograms, or the dashboard lies
A load test that waits hides the tailcoordinated omission, and it is systematic

What is expected at each level

Mid-level

Know the numbers, and use the right statistic.

Quote percentiles rather than averages. Know roughly what a memory read, an SSD read and a cross-continent round trip cost relative to each other. Understand that one network round trip costs more than almost any amount of local computation. You should recognise that connection reuse matters.

You aren't expected to derive queueing behaviour or reach for Little's Law unprompted. You are expected to notice when a proposed design adds a round trip, and to say so.

Senior

Build a budget, and find where the time goes.

Break the request down before optimising. Given a latency target, list the hops and put numbers on them, rather than guessing where the time goes. The most common senior-level miss is optimising the term that was already smallest.

Know that queueing delay is nonlinear. It doesn't grow in step with load. If you propose running a latency-sensitive service at 90 percent utilisation and can't say what that costs, that's a gap. This one fact separates people who have operated systems from people who have only built them.

Use Little's Law to size pools, and reach for it when throughput is flat while CPU is low.

Budget the tail, not the typical case. A budget filled with p50 values will pass, and then the system will miss its p99 anyway.

Distrust your own numbers. A load generator that waits for each response hides the tail. Averaging percentiles across servers gives a meaningless number. Being able to say where a number was measured is part of quoting it at all.

Staff+

The shift is from reducing latency to deciding which latency is worth reducing.

Name the dominant term before touching anything. Be willing to conclude that the work everyone is planning addresses the smallest of the three. "The server is 5 percent of this, so server optimisation is not the project" is the most valuable sentence you can say here.

Treat the number of steps as an architectural constraint. Every tenfold increase in chain length costs each step one more nine. That fact should shape how finely you split a system, and it rarely does.

Trade money for latency on purpose. Headroom is often cheaper than optimisation. Saying "29 percent more machines buys the same three times improvement as a quarter of engineering work" is a decision, not an excuse.

Design for the tail rather than reacting to it. Hedged requests, partial answers, narrow fanout and retry budgets are structural choices made before the incident. They aren't tuning applied afterwards.

Fix the measurement before the system. Insist on merged histograms and a client-side measurement point before any optimisation work gets scoped. That stops a team spending a quarter improving a term that was never the problem.

Know what you would not do. Don't optimise code that is 5 percent of the budget. Don't run a latency-sensitive service above 80 percent. Don't allow unbounded fanout. Don't retry without jitter and a budget. Don't quote a latency target without a percentile and a measurement point.


Sources

  • Jakob Nielsen, Response Time Limits, Nielsen Norman Group. The 0.1, 1 and 10 second thresholds, drawn from human factors research going back to Miller in 1968, and still the right reference points.
  • Microsoft, Azure network round-trip latency statistics. Measured round trips between cloud regions: about 8 ms between neighbouring US East regions, 28 ms from East to Central US, and 71 ms coast to coast.
  • Google and Deloitte, Milliseconds Make Millions. 37 retail and travel brands, with over 30 million mobile sessions monitored for 30 days at the end of 2019. A 0.1 second improvement in load time raised retail conversions 8.4 percent and average order value 9.2 percent, and travel conversions rose 10.1 percent.
  • Jeffrey Dean and Luiz André Barroso, The Tail at Scale, Communications of the ACM, February 2013. The source of the fanout arithmetic and of the hedged request result. Reading 1,000 keys from a BigTable across 100 servers, a hedge sent after 10 milliseconds cut the 99.9th percentile from 1,800 ms to 74 ms for 2 percent more requests.
  • Gil Tene, How NOT to Measure Latency, slides and a good written summary. This is where coordinated omission was named. A load generator that waits for each response before sending the next stops sampling during exactly the stalls you are trying to measure. So it deletes the worst observations before any percentile is calculated. His HdrHistogram library can compensate for it.
  • Jeff Dean, Latency Numbers Every Programmer Should Know. The canonical table behind the work figures. The ratios last; the storage rows are dated and should be treated as upper bounds on modern hardware.
  • M2 Optics, Calculating Optical Fiber Latency. Standard single-mode fibre carries light at about 204,000 km per second, or 4.9 microseconds per kilometre. That's where the 1 millisecond per 100 km round trip comes from.

Spot a mistake, or something unclear? . Or get in touch.

Article

Send feedback

Thank you for helping. We read every report and fix what is wrong.

How do you feel about oneby7?

Sign in to oneby7

Keep your progress, your streak and your code, on any device.

New here? This creates your account too.