Lesson deck

Production operations: capacity, scaling and failure flashcards

Reviewing needs JavaScript. You can read every card in the list below.

Loading your cards...

Back to the lesson13 cards in this deck

Read all 13 cards as a list
  1. Front
    How many replicas do you need?
    Back
    Peak load ÷ per-replica goodput capacity ÷ target utilization (about 0.6 to 0.7), rounded up, plus spares for failures and deploys. Example: 7,500 tokens/s ÷ 2,000 ÷ 0.65 = 5.8, so 6 plus 1 spare.
  2. Front
    What is the Little's law check on a capacity plan?
    Back
    In flight = arrival rate × time in system. Divide by replicas and compare with the KV pool. 20 req/s × 9 s = 180; over 5 replicas is 36 each; a pool of 30 means cache is the constraint.
  3. Front
    Which autoscaling signals lead?
    Back
    Queue or waiting depth, KV-cache utilization, running sequences against benchmarked limits, TTFT p95, tokens per second against capacity. Not CPU, and not GPU utilization alone.
  4. Front
    What makes up cold start?
    Back
    Image pull, weight load (70 GB at 2 GB/s is 35 s), CUDA-graph capture and warm-up, in sequence. Mitigate with pre-pulled images, local weight caches, streamers, warm pools and scaling ahead of ramps.
  5. Front
    How do you scale up and down?
    Back
    Up fast, down slowly. Drain on scale-in: stop new requests, let streams finish up to a maximum generation time, then terminate. Minimum replicas for latency-sensitive tiers.
  6. Front
    How should requests be routed?
    Back
    Least loaded by queue depth or cache usage (cost varies 100 times), prefix-aware where it helps hits, session affinity for chat, adapter-aware, priority tiers, and a router that is itself evaluated.
  7. Front
    When is a retry safe, and what does hedging cost?
    Back
    Retry idempotent requests that failed before the first token, with jitter and the propagated deadline. Hedging sends a second copy of slow requests and doubles GPU load for the hedged share.
  8. Front
    Why does closed-loop load mislead?
    Back
    Clients wait for replies, so offered load drops when the server slows. A server with capacity 8 req/s looks stable. Use open-loop arrivals (Poisson at a set rate) to see queues and tails.
  9. Front
    What goes in an honest benchmark?
    Back
    Realistic length distributions, open-loop arrivals, TTFT and ITL at p50/p95/p99 and goodput at the target across load levels, warm-up discarded, cache hit rate controlled, hardware and precision fixed.
  10. Front
    What do repeated runs on one server do?
    Back
    They can reuse prefix-cache entries and inflate throughput. Vary the seed, restart, or use a sweep mode that resets caches.
  11. Front
    How do you debug a latency regression?
    Back
    What changed? TTFT up: queue, KV full or preemption, longer prompts, lower prefix hit rate, routing, cold replicas. ITL up: batch or context, prefill interference, throttling, interconnect. Reproduce, bisect, profile, fix, add an alert.
  12. Front
    Symptoms or causes: what do you page on?
    Back
    Page on symptoms (TTFT and ITL percentiles, errors, goodput, saturation). Put causes (KV use, queue, hit rate, preemptions, acceptance rate) on dashboards for diagnosis.
  13. Front
    How should a service degrade?
    Back
    Shed low-priority load, cut max tokens, switch to a smaller model, serve cached answers where valid, return clear 429 or 503 with a retry hint. Health checks must generate a token.