All Questions
Llm Inference Serving hard

200 tenants each prepend their own 4K-token system prompt. You run 16 replicas with prefix caching enabled, but round-robin routing gives about a 6% prefix cache hit rate. One tenant generates 30% of all traffic. Which routing policy is best?

  1. A Least-outstanding-requests routing, since evenly balanced queues maximize the chance that every replica's prefix cache stays warm for all of the tenants.
  2. B Pure consistent hashing on tenant ID, since pinning each tenant to exactly one replica guarantees a near-100% prefix cache hit rate for everyone.
  3. C Keep round-robin but enlarge each replica's prefix cache budget so that every replica can hold all 200 system prompts in memory at once.
  4. D Prefix-affinity hashing with bounded load: send each request to the replica holding its prefix unless that replica is over a load cap, then spill over.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions