Inference, Serving & Production·Question 52 of 76Advanced

You run a shared LLM platform for 30 internal teams on one GPU fleet. Design the tenancy model: fairness, isolation, and cost attribution.

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Fairness first, and in the right unit. Continuous batching is effectively first-come-first-served over tokens, so a tenant that fires 10K requests starves everyone else with no error and no signal. You need admission control at the gateway plus fair scheduling in the engine. The unit must be work, not requests: per-tenant token buckets on tokens per second, with output tokens weighted higher than input. Requests-per-second quotas are the classic mistake, because one 200K-token prompt is worth thousands of chat turns. In the scheduler, prefer the tenant that has consumed least service recently (a virtual-token-counter style fair queue) rather than pure arrival order.

Full worked answer

Fairness first, and in the right unit. Continuous batching is effectively first-come-first-served over tokens, so a tenant that fires 10K requests starves everyone else with no error and no signal. You need admission control at the gateway plus fair scheduling in the engine. The unit must be work, not requests: per-tenant token buckets on tokens per second, with output tokens weighted higher than input. Requests-per-second quotas are the classic mistake, because one 200K-token prompt is worth thousands of chat turns. In the scheduler, prefer the tenant that has consumed least service recently (a virtual-token-counter style fair queue) rather than pure arrival order.

Isolation is a ladder, pick a rung per tenant. Shared engine is cheapest and weakest. Separate pools by traffic class is the sweet spot: nearly every org needs exactly two, interactive (latency SLO, headroom, priority) and background/batch (preemptible, no SLO, backfills the trough). That split is also the cheapest capacity trick available. Dedicated fleets only for the tenants with genuine compliance requirements.

Attribution. Log per request: tenant, model, input/output/reasoning/cached-token counts, and measured GPU-seconds. Bill on tokens for legibility, but reconcile against GPU-seconds, because they diverge badly. A tenant with 90% prefix cache hits is nearly free; a tenant with unique 50K-token prompts pays real prefill. Then decide explicitly what happens to unattributable cost (idle headroom, warm pools, failed requests), because otherwise your chargeback never sums to the invoice. Charge it as an overhead rate or eat it centrally, but decide.

Guardrails: per-tenant context and max_tokens caps, per-tenant circuit breakers, and spend alerts on burn rate rather than month-end totals.

The subtle failure modes: noisy neighbours act through KV, not just compute, so one long-context tenant evicts everyone's blocks and triggers preemption cascades. Track preemption rate per tenant. And a shared prefix cache is a cross-tenant timing channel: a fast TTFT reveals that someone else recently sent that prefix. If tenants are mutually untrusted, namespace cache keys per tenant and accept the hit rate loss.

What a good answer covers

  • Fairness first, and in the right unit
  • Continuous batching is effectively first-come-first-served over tokens, so a tenant that fires 10K…
  • You need admission control at the gateway plus fair scheduling in the engine
  • The unit must be work, not requests
  • Requests-per-second quotas are the classic mistake, because one 200K-token prompt is worth thousands of…

Key terms: Attribution · Guardrails · The subtle failure modes

Interviewer follow-ups to expect

  1. Why are requests-per-second quotas the wrong unit, and what would you use instead?

  2. How do you price internal chargeback when 60% of a tenant's input tokens are cache hits?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep