Problems / LLM serving, medium

The eval run eats the production quota

An agent product serves 20 chats a second on one provider key with 6 million input tokens a minute. A CI regression gate runs the eval suite on the same key: 2 eval tasks a second, 20 model calls each, 4,000 tokens a call.

Unlock it once for 15 credits; everything inside it is free (runs, changes, Submit, results, hints). Sign in with Google to start; new accounts get free credits.

Your goals

Chat success ≥ 99.5%; evals succeed ≥ 95%.

Test cases

Like a coding problem, a solution has to pass every case, not just the one it was built for. Submit in the lab runs all 6; 2 of them are hidden until then.

  1. As given. The problem’s own traffic, scheduled failures and seed.
  2. Peak hour. 25% more traffic than the problem states, with the same failures.
  3. A slow dependency. The main data store or model answers twice as slowly for part of the run.
  4. A server dies. One replica of the service with the most replicas is killed for part of the run.

The traffic

22 requests a second for 45 seconds: 91% chat (reads), 9% eval (writes).

The system

What each component does in this design, and what calls it. The simulator mimics each one from these settings.

ComponentIts job hereSettings
Load balancerLoad balancerTraffic enters here.Calls Agent API.Layer 4 balancers route by IP and port; layer 7 balancers read HTTP and can route by path or header.–
Agent APIApp serviceLoad balancer forwards to it.Calls Model, Eval runner (CI regression gate).Little's law: throughput ≈ concurrency ÷ latency. 200 slots at 50 ms serve about 4,000 req/s.3 replicas × 500 slots · timeout 120 s
Eval runner (CI regression gate)Batch job runnerAgent API calls it for /eval.Calls Model.Batch jobs process large data sets on a schedule rather than per request.400 slots · 20 steps
ModelLLM endpointAgent API calls it for /chat. Eval runner (CI regression gate) calls it.Latency has two parts: time to the first token, then a steady stream of tokens per second.4000 streams · 6M input tokens/min

More llm serving problems