← Blog

A simple fix for LLM tail latency, and why writing tools still hitch

HOAi's HN post argues request hedging beats a priority tier for LLM tail latency. Here is the mechanism, the cost, and what it means for interactive writing tools.

·6 min read·Ryota Nishiyama

A Hacker News thread circulating HOAi's note A simple fix for LLM tail latency is not a new model. It is an old distributed-systems trick applied to token APIs: when a small fraction of calls are very slow, send a second copy and take whichever returns first.

That matters to people who sit in front of a rewrite box. Median latency can look fine while p99 is a multi-second hitch — long enough for a writer to assume the run failed and click again. This article explains the mechanism as HOAi and related write-ups describe it, the conditions under which it helps, and what it does not change about academic humanizing. It does not claim that Suikou AI implemented hedging.

Tail latency is a product bug even when the average is fine

Interactive LLM features are judged on the slow turns, not the average turn. A humanizer, a citation-preserving rewrite, or a detector score that arrives in 800 ms most of the time still feels broken if one request in twenty stalls for several seconds. The writer has already started rereading the paragraph. They retry. Now two requests are in flight, the first of which may still complete and overwrite the second.

HOAi's reported comparison is specific to their voice-agent setting: they replayed production requests against a provider priority tier versus sending each standard-tier request twice and keeping the faster response. They published time-to-first-token and time-to-complete figures in which the doubled standard-tier path beat the priority tier on the tail, including a much better worst case. Those numbers are their replay, not a universal law. The transferable claim is narrower: if slowness is rare and not perfectly correlated across copies, a duplicate in-flight request can cut the tail without buying the premium SKU.

Google's "The Tail at Scale" paper is the usual citation for the same idea in datacenter RPCs. LLM HTTP calls are just another RPC with a long, skewed latency distribution.

Hedging is not a retry

A retry starts after failure — an error, a refusal, or a timeout you already waited out. You have already paid the full wait. A hedge starts while the first call is still running. Dean and Barroso's rule of thumb, repeated in later LLM gateway write-ups: once a request has been outstanding longer than a high percentile of expected latency (often p95), send a second identical request and take the first success. Cancel the loser if the client API allows it.

The delay is the whole game:

  • Hedge at time zero and you duplicate every call. Cost and load roughly double. You have bought a worse version of "send twice always."
  • Hedge at or above your measured p95 and you only duplicate the slow tail — the requests that were going to hurt the UI.
  • Hedge too late and you wait almost as long as a timeout, then pay for a second call anyway.

Adaptive variants track a live percentile with a streaming sketch and fire only when the primary crosses it. An InfoQ write-up on adaptive hedged requests describes a token-bucket cap so an outage cannot turn every call into two calls and melt the remaining healthy backends. That budget is not optional if the failure mode is correlated (one region, one GPU pool, one provider incident).

When hedging is the wrong lever

Hedging assumes the slow path is a straggler, not a systematic stall.

Do not hedge, or hedge only with a hard cap, when:

  • The work is not idempotent. Two completions of a tool call that books a meeting or writes a file are not "the same request." gRPC hedging docs state the same precondition.
  • You are streaming tokens to a UI that cannot merge two streams. Two first-token races are messy unless the client buffers until a winner is chosen.
  • The two copies share fate. Two connections to the same overloaded replica do not help. Independent regions or providers help more than two sockets to one host.
  • The prompt is huge and prefill-bound. If every call is slow because the input is 100K tokens, a twin request will also be slow. Cut the prompt, cache the prefix, or pick a smaller model first.
  • You are running batch jobs. Tail latency of a nightly detector sweep is an operations metric, not a writer-facing hitch. Spend the extra tokens on quality, not on a race.

HOAi compared hedging to a priority tier. That is a cost comparison: pay ~2× per token for a faster SKU, versus paying extra only on the hedged fraction. If your p95 hedge rate is 5 percent and you cancel losers quickly, the bill is not 2×. If your delay is zero, it is.

What this means for a writing tool

A Japanese- or Korean-aware humanizer is not a realtime voice agent. The user is staring at a paragraph, not sitting in silence on a phone call. The latency budget is still real. After paste, the interface has a few seconds before the writer context-switches. A 9-second tail on an otherwise 1-second median is enough to train a retry habit, which then creates duplicate writes.

The first levers are still cheaper than hedging:

  1. Do not block the first paint on the full rewrite. Show a progress state. Keep the original text on screen.
  2. Make the request idempotent in the UI. A second click should not spawn a second untracked completion that races the first into the editor.
  3. Cache unchanged prefixes. Academic drafts often share a title page and bibliography. Prefill that once.
  4. Right-size the model for the pass. A detector score and a morphology-aware rewrite are different jobs. Putting both on the largest available model makes the tail worse for no editorial gain.
  5. Measure p95/p99 on the user-facing path, not only average duration in a dashboard that hides retries.

After those, hedging is a legitimate last lever for the remaining stragglers — for example a detector call that is idempotent, non-streaming, and small. It is a gateway concern, not a morphology concern. Suikou AI's product job remains rewriting academic text so Japanese and Korean drafts do not come back as English-shaped sentences. Latency engineering does not replace that. It only decides whether the writer still trusts the button.

How to read the HOAi numbers

Treat the published table as one team's replay against one provider, in one week, on one traffic mix. Copy the method (measure tail, compare priority SKU vs hedge, cancel losers) rather than the milliseconds. If a later post quotes "p99 dropped 74 percent" from an adaptive-hedging article, that figure belongs to that system, not to your humanizer.

For readers of Suikou AI, the practical takeaway is: when a rewrite hitch feels like "the model is down," it is often a tail-latency event. Retrying blindly makes it worse. Hedging is one way operators race the straggler. Editing the output is still a separate, human pass — which is the other half of not shipping slop.