Wink Pings

How Does a 4.5% Cache Hit Rate Translate Into 28% More Tasks?

Google Antigravity pushed the cache hit rate up by 4.5 percentage points, and the number of tasks that can be completed within quota rose by 28%. That math only works in the 90% hit-rate range, and the lever actually doing the work is a router most developers have never given a proper look.

Varun Mohan said on X that Neon’s cache hit rate in Antigravity had risen by another 4.5%, and the number of tasks that can be completed within quota was therefore 28% higher. Over 5 days, thanks to cache and harness improvements, Neon’s actual usage within subscriptions was pulled up by nearly 75%.

Screenshot of Varun Mohan’s tweet

A 4.5% gain producing 28% more tasks is a ratio some people immediately spotted as off. Commenter Oliver Leisgen did the math: under the standard 90% cache discount, only if you were already running near a 90% hit rate and then squeezed out another 4.5 points could you cut expensive uncached prefill by roughly half. Varun himself acknowledged that going from 80% to 90% and going from 90% to 95% are the same thing proportionally, but the latter has a much larger absolute payoff.

The question is where that 4.5% came from. Google did not say. But when it comes to cache hits, there is a server-side lever most developers never see: the router.

A cache hit means the beginning of your prompt—the prefix—has already been stored as KV cache, so the model skips recomputing it. The catch is that a large deployment has many workers; each worker is a model server maintaining its own KV cache. The cache is only useful if the next request lands on the worker that holds it.

An ordinary load balancer does not know this. Round-robin sends each request to the next machine in turn. With N workers, the probability that a follow-up request hits the correct machine is roughly 1/N. With 8 workers, that is 12.5%. The rest of the time, a worker recomputes the entire prefix.

Agentic applications are the most sensitive to this. On every turn, an agent resends the same long prefix containing the system prompt, tools, files, and prior conversation. If the prefix stays the same, a hit pays off; if the prefix lands on the wrong machine, the work is wasted.

Prefix-aware routing exists to target exactly this problem, and there are several approaches from coarse to fine:

  • Prefix affinity: requests from the same client are always sent to the same worker. The downside is that one busy client can overwhelm a single machine.
  • Consistent hashing: hash the session key or the beginning of the prompt so that requests sharing that segment land on the same machine.
  • Approximate tracking: the router keeps its own guess about what each worker has cached. After eviction or a restart, that guess goes stale.
  • Exact tracking: workers report KV cache events, and the router knows exactly where each cache block is.

A good router also factors load into its scoring. Hitting an already overloaded worker can be slower than missing a little on an idle machine.

You can see these implementations directly in open source. vLLM Router started as a fork of the SGLang gateway and uses consistent hashing to pin sessions to workers holding the cache; the SGLang router tracks prefixes with a radix tree and switches to the shortest queue when load is uneven; NVIDIA Dynamo tracks KV cache events and estimates the cost of prefill and decode on each worker; llm-d uses KV cache events from vLLM, SGLang, and TensorRT-LLM to route on Kubernetes.

The comments also contain a few details worth noting.

One commenter pointed out a client-side rule in Gemini’s caching documentation: if the next turn adds fewer than 2,050 tokens, the full request from the previous turn will not be cached, and the most recent 2,050 tokens are billed at standard input price. Output, chain of thought, and tool results all count toward that number.

Another commenter said they had been burned by a pitfall: putting a timestamp at the top of the system prompt immediately invalidates the cache, and the cost is not small.

Another user reported that in an Orchestrator scenario the cache was not being reused, hit rates on some threads were only around 40%, and quota dropped faster instead. Varun replied to this one, which shows they saw it.

Screenshot of a reply from user qinglong

In his reply, Varun split the improvement into two parts: one is capacity—more machines means fewer evictions over long runs; the other is routing—requests more easily land in the right place. The remaining long-tail problems are harder, and he specifically thanked the infrastructure team.

If you host models on multiple replicas yourself, there is one thing you can do right now: measure cache hit rate separately by workload. A load balancer that is oblivious to caching will waste the hits you earned by carefully designing your prompt structure.

Original tweet

发布时间: 2026-11-27 01:30