← Engineering blog

Performance · · 6 min read

Why 50 ms is the ceiling for an API response

The conversion and retention data behind our latency budget, and how we measure it in every region.

Leila Nakamura

Why 50 ms is the ceiling for an API response

The link between latency and revenue is one of the best documented correlations in product analytics. Yet most engineering teams operate as if latency is a refinement, something to optimize after launch, after product-market fit, after growth.

We think this is backwards. Every feature is experienced through its latency, so latency comes first.

The Human Perception Threshold

Human cognition operates on predictable timescales. These numbers matter for engineering decisions:

  • 100ms: The threshold below which a system feels “instant.” Users do not perceive the delay, the action and the result feel simultaneous.
  • 200ms: The first perception of delay. Users notice something is happening, but accept it as normal.
  • 400ms: Cognitive disruption begins. Users shift attention, begin to wonder if their action registered.
  • 1000ms: Users are pulled out of the task. The system has broken the perception of continuous interaction.

These are not preferences. They are documented properties of the human attentional system. Engineering against them is engineering against human biology, a battle you will lose.

The Revenue Correlation

The data is unambiguous. Across industries and company sizes:

E-commerce: Amazon has documented that every 100ms of latency costs approximately 1% of revenue. At Amazon’s scale, this is billions of dollars annually. At your scale, it is still significant.

SaaS: Stripe found that reducing API latency by 25% increased trial-to-paid conversion by 6.7%. The connection is not intuitive, but it is real: slow APIs make your product feel fragile and untrustworthy.

B2B Enterprise: Salesforce found that users of faster-loading instances were 16% more likely to renew. Slow software is software that feels broken. Broken software gets replaced.

The cumulative picture: latency is not an infrastructure metric. It is a business metric with direct causal connections to revenue.

Where Latency Actually Lives

Most teams measure latency at the wrong layer. “Our API responds in 50ms” is meaningless if the user experiences 450ms because of:

  • DNS resolution: 20-120ms (often ignored entirely)
  • TCP handshake: 1× RTT
  • TLS negotiation: 1-2× RTT
  • Time to First Byte: your application processing
  • Content Download: network throughput
  • Browser rendering: out of your control

The server-side 50ms response is 10% of the user-perceived latency. The other 90% is network and connection setup, which is why geographic proximity to users is not a nice-to-have. It is the primary lever.

Measuring What Matters

P99 latency is the correct metric. Here is why median and average fail:

If 99% of your requests complete in 20ms but 1% take 2000ms, your median looks excellent. But at 100 requests/second, that’s one user every second experiencing a 2-second stall. At 10,000 requests/second, that’s 100 users per second experiencing failure-like latency.

P99 latency is the experience of your most frustrated users. Those are the users who churn. Those are the users who write negative reviews. Those are the users who tell their colleagues your product is slow.

# Correct latency SLO definition
latency:
  p50: 8ms     # Median, keep this as a diagnostic
  p95: 22ms    # Most users, most of the time
  p99: 50ms    # Maximum acceptable for all but extreme outliers
  p999: 200ms  # Budget for extreme tail cases

The Eradication Strategy

Achieving sub-50ms P99 globally requires a layered approach:

Layer 1, Network: Edge infrastructure with anycast routing eliminates propagation delay. This is the single highest-leverage intervention.

Layer 2, Connection: HTTP/3 with QUIC eliminates TCP handshake overhead and head-of-line blocking. Enable it everywhere.

Layer 3, Application: Response caching at the edge for cacheable content. For dynamic content, pre-computation and edge-side logic execution. Move computation to data, not data to computation.

Layer 4, Protocol: Aggressive use of connection keep-alive, TLS session resumption, and pre-connect hints. Browser-level performance engineering, not just server-level.

Most teams stop at Layer 3. The difference between sub-100ms and sub-50ms global P99 lives in Layer 1.

Move your infrastructure to the edge. The physics will do the rest.