A page makes 20 parallel backend calls, each with a p99 of 1 second and a p50 of 40 ms. What is the page's latency profile?
Show the full answer Hide the answer
What is being tested
Whether you understand tail amplification under fan-out — the mechanism by which a service-level p99 becomes a page-level typical experience.
The arithmetic
The page completes when the slowest of the 20 calls completes. Each call independently has a 1% chance of exceeding 1 second.
The probability that no call exceeds 1 second is 0.99²⁰ ≈ 0.818.
So roughly 18% of page loads take over a second. A p99 at the service level has become approximately a p82 at the page level.
That is the whole point: with fan-out, the tail is not an edge case. It is the common case.
The consequences for design
Tail latency at one layer is typical latency at the next. A service whose p99 is acceptable in isolation can be entirely unacceptable when fanned out over. This is why fan-out architectures must target p99.9 rather than p95, and why "our p99 is fine" is not a sufficient answer from a backend team serving an aggregating caller.
What to do about it
1. Reduce the fan-out. Twenty calls is the root cause. Batch endpoints, denormalised views, or a precomputed aggregate remove the multiplication entirely — and this is usually the highest-value fix.
2. Hedged requests. After a delay set near the p95, issue a duplicate request to another replica and take whichever returns first. Cuts the tail dramatically for a small increase in total load — typically around 5% extra traffic. Requires the operation to be idempotent and safe to duplicate.
3. Per-call deadlines within an overall budget. Give the page 800 ms; give each call a deadline derived from the remaining budget. A call that cannot finish in time is abandoned and degraded rather than allowed to define the page's latency.
4. Make calls optional. If 14 of the 20 are enrichment rather than essential, render without them when they are slow. This is graceful degradation applied at the request level, and it is what makes a fan-out page feel fast.
5. Fix the tail at the source. Investigate why the p99 is 25 times the p50. That ratio usually indicates a bimodal distribution — cache hit versus miss, or a slow path taken by a minority of requests — and fixing the slow path helps everyone.
What a strong answer adds
Noting that this is why percentiles do not compose, and why a system of services each meeting its SLO can comprehensively fail to meet the user's. Composition of latency objectives across a fan-out must be calculated, not assumed, and the calculation above is how.