Skip to main content
One promise kept, one still pending.

Summary

This demo shows how the router treats two kinds of requests differently:
  • Requests that match existing saved state (“returning” requests) are routed to the pod that already holds that state — the router “pulls them home”.
  • Brand-new, unique requests (no saved state anywhere) are spread across available pods based on live signals such as CPU availability, request queue lengths, scratchpad usage, and the newcomer spreader.
The experiment uses Prometheus to verify where prompt tokens are processed and compares two runs: a concentrated run (repeated identical prompt) and a spread run (many unique prompts).

Router behavior and expectations

The router configuration encodes both behaviors:
  • If a prompt has saved work, the router should favor routing it back to the pod that already has that work (high “prefix” score).
  • If a prompt has no saved work, the router should place it where it will cost the least at runtime — i.e., wherever capacity is available, which should naturally distribute new work across the fleet.
Expectation: when every incoming request is distinct (no saved state), the router should spread those requests approximately across all available pods. When requests repeatedly match existing saved state, the router should concentrate them on the pod holding that state.

Observing the baseline in Prometheus

Before sending traffic, we query Prometheus for prompt tokens processed by each pod:
At the baseline, right before firing traffic, the metric shows zeros:

Burst test — 30 unique concurrent requests

This test launches 30 distinct prompts in parallel. Each prompt includes a unique counter so the router cannot treat them as saved-state matches; every request is a newcomer. Shell prompt before firing the requests:
When all 30 concurrent curls are started (backgrounded with &), responses stream back as each pod finishes its work. The output below is a scrambled sequence because processing happens concurrently across pods:
All returned HTTP status codes are 200. Because each request is unique, the router placed them using runtime signals (CPU, queues, scratchpad) rather than saved-state affinity. After the final response, we re-query Prometheus and find that tokens were processed across all three pods — the burst landed across the fleet rather than piling up on a single server. This confirms the router spread new requests based on live costs.

Compare with a concentrated run (repeated identical prompt)

For contrast, here is the same Prometheus query used for the concentrated run:
Example result from the concentrated run (6 repeats of the same prompt):
That result shows almost all movement concentrated on a single pod — the router “pulled home” repeated requests with saved work.

Quick comparison

Note: In the table, Prometheus-style labels are shown as code snippets.

Why this matters

  • The router applies one consistent cost-based rule to every request: route to the pod that will minimize cost.
    • If saved work exists, the cheapest choice is where the saved state lives (concentrate).
    • If no saved work exists anywhere, the cheapest choice is wherever capacity is available (spread).
  • This is fundamentally different from a blind load balancer, which treats all connections equally and cannot preserve or exploit saved work affinity.
  • The observed behavior relies on the router’s heuristics and visibility into traffic patterns; it is effective but still an inference.
One honest caveat: these routing decisions still relied on the router’s visibility into where saved work likely lives, inferred from observed traffic. That’s a good heuristic but still a guess. The next step is routing that knows exactly which pod holds which saved work and a cache or metadata store the router can consult to make definitive routing decisions.

Key takeaways

  • The same routing logic can produce both concentrated and spread outcomes depending only on whether requests match saved work.
  • Prometheus metrics provide an effective way to confirm where prompt tokens are processed and to validate routing behavior.
  • To make routing decisions deterministic for saved work, introduce an authoritative metadata store or cache the saved-work-to-pod mapping in the router.

Watch Video