HomeNews

Prefix-Affinity Routing Cuts CPU LLM TTFT 15x on Kubernetes

Emergent News Desk
Emergent News Desk
•
Dec 6, 2026 1:04 AM
•
0
 min read
Select Emergent as your Preferred news source
Prefix-Affinity Routing Cuts CPU LLM TTFT 15x on Kubernetes

💡 TL;DR

  • A Medium write-up reports that prefix-affinity routing cut time to first token 15x for llama.cpp serving on CPU-only Kubernetes.
  • The technique sends requests with shared prompt prefixes to the same replica so cached prompt work can be reused.
  • The result targets teams without GPUs, though the figures come from one write-up and are not independently verified.

A new engineering write-up on Medium's The Pipeline publication says prefix-affinity routing cut time to first token by 15x when serving large language models with llama.cpp on CPU-only Kubernetes. The post, which surfaced on Hacker News on December 05, 2026, targets teams that need LLM inference without GPU hardware.

What the write-up reports

According to the post's title and summary, the author ran LLM serving on a Kubernetes cluster with no GPUs, using llama.cpp as the inference engine. The headline result is a 15x improvement in time to first token (TTFT), the delay between sending a prompt and receiving the first generated word.

The full methodology, hardware details and benchmark conditions sit in the original article. This report relies on the published headline claim and does not independently verify the numbers.

Why prefix-affinity routing matters on CPUs

On CPU hardware, processing the prompt (the prefill stage) is often the slowest part of a request, especially when prompts are long. Many production workloads repeat the same opening text across requests, such as system prompts, tool definitions, or shared documents.

Prefix-affinity routing aims to exploit that repetition. Instead of spreading requests evenly across replicas, the router sends requests that share a prompt prefix to the same backend. That backend may already hold the computed state for that prefix, so it can skip repeating the work.

  • Round-robin routing: requests land on any replica, so cached prefix work is often wasted.
  • Prefix-affinity routing: requests with matching prefixes return to the replica most likely to hold that cache.
  • Likely effect: less repeated prefill, which mainly improves TTFT rather than token generation speed.

Where this fits in LLM serving

Cache-aware routing is a growing theme in inference infrastructure, and it is usually discussed alongside GPU serving stacks. A CPU-only account is notable because llama.cpp is widely used on commodity hardware, and Kubernetes is the default platform for many internal deployments.

Readers who track latency metrics may also want a primer on time to first token, since it drives how responsive chat and agent interfaces feel even when overall throughput is modest.

Caveats to keep in mind

  • The 15x figure is a single reported result; gains depend on how much prompt overlap a workload actually has.
  • Workloads with unique, non-repeating prompts would likely see smaller benefits.
  • Affinity routing can concentrate load on certain replicas, so balancing against cache hits is a practical tradeoff.
  • The Hacker News thread had little discussion at the time of writing, so there is no community validation yet.

Availability

Officially released on December 05, 2026, according to the source timestamp, the write-up is freely available on Medium through The Pipeline: AI, ML and Cloud publication. It is a technical article rather than a packaged product, so there is no software release attached to the announcement itself. Teams interested in the approach would need to follow the author's description and apply it to their own llama.cpp deployments.

What this means

If the reported result holds up in other environments, it suggests that routing policy can matter as much as raw compute for CPU-based LLM serving. Organizations running small or medium models on existing Kubernetes clusters may be able to improve responsiveness without buying accelerators, provided their traffic shares long common prefixes. The claim deserves replication, but it points to a low-cost optimization worth testing before scaling hardware.

About the writer

Emergent News Desk covers the latest in artificial intelligence, from new models and tools to research breakthroughs, industry moves and the people shaping the field. Written and reviewed by Emergent staff, our coverage aims to make fast-moving AI news clear and useful for builders, founders and anyone curious about where the technology is heading.

Start Building
on Emergent today
Try Emergent