SageMaker prefix-aware routing cuts P50 TTFT by up to 77% via warm KV caches

AWS ML Blog · rss · 2026-09-11

Amazon SageMaker Inference launched PREFIXAWARE routing: it inspects the start of each request and consistently sends requests sharing a prefix to the same instance, so KV caches actually stay warm. Benchmarked on Llama 3.1 70B across 7 p5.48xlarge instances with vLLM, long-context workloads (8,000-token shared prefixes) saw P50 TTFT drop 71–77%, throughput up 15–16%, and KV cache hit rates rise from 25% to 82%; short-context gains were smaller (P50 down 13–16%).

Mechanics and safeguards:

PrefixLength ranges 1024–65536 (bytes for the native API, characters for the OpenAI-compatible API) and should cover the shared prefix plus enough unique content to spread load. Routing overhead is just 1.3–1.9ms. Best-fit patterns: RAG over shared documents, multi-turn conversations, templated instruction bots, and code completion.

Original post →

More from Infra

Infra channel →