AI engineering glossary · Inference serving optimisation

What is cache-aware routing?

Cache-aware routing (also called Prefix-aware routing): A load-balancing policy that sends a request to the replica most likely to already hold a matching prompt prefix in its KV cache, so prefill work is reused instead of repeated. It must be balanced against keeping load even.

Level: advancedTopic: Inference serving optimisation

Cache-aware routing: an example

All requests starting with the same 2,000-token system prompt are steered to the same two replicas.

Related terms

More Inference serving optimisation terms

Where you learn it

Cache-aware routing is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.