Pidoku

Scenario: 70B Model, 10,000 Concurrent Users, Fixed Budget

Module 23 Lesson 23.k 2h Difficulty 5/5

Prerequisites 12.q, 14.c, 17.h, 21.h, 23.a, 23.b, 23.c

★ The capstone. This is the system design question for inference engineering roles, and a real design exercise. Work through it yourself before reading the solution.


Before you start: words you need#

WordPlain meaning
Concurrent usersPeople with an open conversation. Most of them are reading or typing, not waiting for tokens.
Little’s lawAverage number in a system = arrival rate × average time each spends there. Turns “requests per second” into “requests running at once”.
HeadroomHow many times peak traffic can grow before an objective breaks. 1.0× means “exactly at the limit”.
Prefix-cache retentionKeeping a conversation’s KV blocks in GPU memory between turns so the next turn skips most of its prefill (12.m).
Token budgetvLLM’s max_num_batched_tokens: how many tokens, decode and prefill together, one engine step may process (17.b).
Critical dependencyAn assumption the whole design rests on. If it fails, the design fails.

1. What is it?#

One brief, answered end to end with the tools of this material:

REQUIREMENTS
  Model:        Llama-3.3-70B-Instruct (or another dense 70B with GQA)
  Users:        10,000 concurrent active conversations at peak
  Workload:     chat. Mean 1,200 input tokens (with history), 350 output tokens.
                p95 input 6,000, p95 output 1,200. One turn per user every ~3 minutes.
  Objectives:   p95 TTFT < 500 ms for inputs up to 4,000 tokens
                p95 ITL  < 40 ms
                99.9% availability
  Budget:       fixed at 64 H100 SXM GPUs (8 nodes of 8, NVSwitch inside each node)
  Constraints:  one region at first

QUESTION: design the serving architecture. Does it meet the objectives?
          What breaks it, what does it cost, and would you spend the whole budget?

Stop here. Sketch your answer before reading on.

The solution below comes from one small program (section 6) that turns the stated assumptions into numbers. Facts checked on 13 November 2026: vLLM v0.32.0 flags, H100 specifications, and rental prices of about $2–3 per H100-hour (23.b).


2. Why does it matter?#

This question tests whether you can do the arithmetic before drawing boxes, name your assumptions, find the binding resource, and say what would break the design. Two traps catch most answers:

  1. Treating 10,000 users as 10,000 generations. Little’s law gives the real number, and it is about a hundred, not thousands.
  2. Concluding that memory is plentiful. The running batch needs almost no KV memory, but the prefix cache keeping 10,000 idle conversations warm needs nearly all of it. That is what the design really depends on.

3. Simple analogy#

A restaurant with 10,000 diners seated. Most are eating, talking or reading the menu; only a few are waiting for a dish at any moment. The kitchen is sized for the orders in flight, not the seats. But each table’s half-prepared ingredients sit in the fridge between courses, so the next dish is quick. The fridge, not the stoves, fills up first.


4. Tiny example: how many are actually generating?#

arrival rate      λ = 10,000 users ÷ 180 s per turn             = 55.6 requests/s
time per request  W = TTFT + 350 tokens × ITL ≈ 0.25 + 350 × 0.0065 ≈ 2.5 s
running at once   L = λ × W                                      ≈ 140 requests

Ten thousand “concurrent users” are about 140 requests in flight, of which about 125 are decoding at any moment: some 21 per node across six serving nodes (the program’s figure), each receiving ~150 tokens per second. The ITL in that formula depends on the batch, and the batch on the ITL, so section 6 solves the two together.


5. Technical explanation#

Step 1: what one node can do#

HARDWARE (one node, 8× H100 SXM, TP=8)
  80 GB HBM3 and 3.35 TB/s per GPU; ~1,979 TFLOP/s FP8 dense (~989 BF16)

MODEL AT FP8 (13.e)
  weights 70.6 GB → 8.8 GB per GPU
  KV per token: 2 × 80 layers × 8 KV heads × 128 × 1 byte = 160 KiB (FP8 KV, 13.h)
                → 20 KiB per GPU at TP=8 (12.f)
  free for KV per GPU: 80 × 0.90 − 8.8 − 4 (activations, graphs) = 59 GB

DECODE STEP (12.q, 14.c)
  read weights: 8.8 GB ÷ (3.35 TB/s × 70%)         = 3.8 ms
  2 all-reduces × 80 layers × ~7 µs                = 1.1 ms
  scheduler, sampling, launches                    ≈ 1.0 ms
  per running request at ~1,375 tokens of context  ≈ 0.012 ms
  → about 5.9 ms + 0.012 ms × batch

PREFILL
  2 × 70.6 GFLOP per token ÷ (8 GPUs × 1,979 TFLOP/s × 40%) ≈ 22 µs per token
  → ~45,000 prompt tokens per second per node

The efficiency factors (70% of bandwidth, 40% of peak FLOP/s) are assumptions. On a real system measure the decode step at batch 1 and batch 64, and a prefill, then put the measured values into the program (19.d).

Step 2: demand at peak#

requests          55.6/s
prompt tokens     55.6 × 1,200 = 66,700/s
output tokens     55.6 × 350   = 19,500/s

Without prefix caching, prefill is 66,700 tokens/s, or 1.5 nodes’ worth of pure prefill. With it, each turn re-uses the conversation so far. A 75% hit rate on prompt tokens cuts prefill to ~16,700 tokens/s. But that hit rate is only real if the cache keeps each conversation’s KV for the three minutes until its next turn:

retained KV per GPU = conversations per node × tokens per conversation × 20 KiB
                    = (10,000 ÷ 6) × 1,550 × 20 KiB ≈ 53 GB   of 59 GB free  (89%)

This is the real memory budget: the cache of idle conversations, not the running batch (17.h). With fewer nodes, or BF16 KV, it no longer fits, the oldest conversations are evicted, and the hit rate falls.

Step 3: the architecture#

flowchart LR
  C["Clients"] --> GW["Gateway<br/><small>auth, limits, tokenize (21.i, 23.j)</small>"]
  GW --> R["Router<br/><small>prefix-aware, conversation affinity (21.h)</small>"]
  R --> G["General pool<br/><small>6 nodes, TP=8, ≤ 8k context</small>"]
  R --> L["Long-context pool<br/><small>1 node, > 8k context</small>"]
  R -.-> S["Spare / canary<br/><small>1 node (23.e, 23.g)</small>"]
  class C,GW io
  class R queue
  class G,L compute
  class S neutral
DECISION                        WHY
TP=8 per node, DP across nodes  TP=8 fills one NVSwitch domain; TP across nodes puts
                                160 all-reduces per step on the network (14.c, 9.g).
                                Data parallelism adds throughput (14.b).
FP8 weights and FP8 KV          Halves weight reads per step and doubles the KV that fits.
                                FP8 KV is what lets the cache hold every idle conversation.
Prefix caching + affinity       Turn N re-uses turns 1..N−1. Without routing by
                                conversation, each turn lands on a random node and the hit
                                rate is ~1/6 of what it could be (21.h).
Chunked prefill, budget 1,024   The budget that keeps p95 ITL under 40 ms (section 4 table).
Long-context pool               A 32k prompt holds ~20× the KV of a normal turn and long
                                prefills stall decode; isolate them (21.g).
One spare node                  N+1 for 99.9%, and the canary target for rollouts.
CUDA graphs (default)           At ~21 requests per node, launch overhead matters (13.k).

Step 4: the configuration#

Shell
vllm serve meta-llama/Llama-3.3-70B-Instruct \
  --quantization fp8 \
  --kv-cache-dtype fp8 \
  --tensor-parallel-size 8 \
  --max-model-len 8192 \
  --max-num-seqs 128 \
  --max-num-batched-tokens 1024 \
  --gpu-memory-utilization 0.90 \
  --enable-prefix-caching \
  --scheduling-policy priority \
  --max-num-queued-reqs 512
VALUE                         WHY
--max-model-len 8192          p95 input 6,000 + p95 output 1,200 = 7,200, plus margin.
                              Longer requests go to the long-context pool.
--max-num-seqs 128            ~6× the expected 21 per node: room for bursts and growth,
                              without letting a burst push p95 ITL past the objective.
--max-num-batched-tokens 1024 From the program: 512 → p95 ITL 17 ms, 1,024 → 29 ms,
                              2,048 → 51 ms (too slow). Each step's decode tokens count
                              against the budget too (17.b).
--gpu-memory-utilization 0.90 Leaves room for activations of the largest chunk.
--enable-prefix-caching       On by default in vLLM v0.32.0; stated so nobody turns it off.
                              Chunked prefill is also on by default.
--max-num-queued-reqs 512     Bounded queue: beyond it the engine answers 503 and the
                              router tries another node (20.c, 16.e).

Step 5: does it meet the objectives?#

From the program, at peak, per general-pool node:

batch 21, mean ITL 6.5 ms, p95 ITL 28.5 ms          objective 40 ms   ✓
TTFT for a new, uncached 4,000-token prompt 253 ms   objective 500 ms  ✓
  (25 ms network + 10 ms gateway + 4 ms tokenize + 100 ms queueing allowance
   + 4 chunked-prefill steps of ~28 ms)
prefill share of GPU time 6%
headroom: traffic can grow 3.7× before an objective breaks

Availability. Losing one general node leaves 5, still with 3.1× headroom; the spare replaces it within minutes (23.e). Rolling upgrades take one node out at a time. 99.9% (43 minutes a month) is achievable if failure detection and restarts are fast and the region itself stays up (23.f).

Verdict: the objectives are met with large headroom. The budget is not the problem.

Step 6: what breaks it#

SCENARIO                           HEADROOM   TOKEN BUDGET   HIT RATE
base design (6 general nodes)        3.68×        1024          75%
prefix hit rate falls to 20%         3.42×        1024          20%
prompts double (2,400 tokens)        1.92×        1024          46%
BF16 weights and KV, not FP8         1.53×         512          34%
BF16 and hit rate 20%                1.39×         512           9%
one general node lost (5 left)       3.13×        1024          69%

Two things stand out:

  • What fails first is the prefix cache, not the GPUs. As traffic grows, more conversations must be retained, the cache evicts them, the hit rate drops, prefill grows, the batch grows and holds more KV, which evicts more. Near 3.7× the base design tips over that way. Watch the hit rate (vllm:prefix_cache_hits_total ÷ vllm:prefix_cache_queries_total, 22.j) as the early warning.
  • Longer prompts hurt more than a lower hit rate, because they increase both the prefill and the KV every idle conversation needs. A product change that adds retrieval to every prompt is a capacity event.

The critical dependency is FP8, for the cache as much as for speed. BF16 still meets the objectives at today’s peak (1.5× headroom), but with a token budget of 512 and a third of the hit rate. Validate FP8 quality on your own evaluation suite before committing (11.k, 23.g), and keep a fallback with a different method (for example INT8 W8A8) in case one format shows a regression.

Step 7: cost, and whether to spend it all#

64 GPUs × $2.50 per GPU-hour × 8,760 h          = $1.40M per year
output tokens per year at 45% of peak on average = 2.76 × 10^11
→ $5.08 per million output tokens

That is high because the fleet is sized for peak and peak is a few hours a day (23.c). The program shows how much the design actually needs:

general pool of 4 nodes              2.50×        1024          55%
general pool of 3 nodes              1.84×        1024          41%
3 nodes + 1 TB host KV tier each     2.59×        1024          75%

Four general nodes plus the long-context node and the spare (48 GPUs) still give 2.5× headroom, and cost $1.05M a year, or $3.81 per million output tokens. Three general nodes run out of cache before they run out of compute; adding a host-memory KV tier (vLLM --kv-offloading-size, about 2 TB of DRAM in a DGX H100; 14.k) restores the 75% hit rate and gives more headroom than four nodes without one. The honest answer to “would you spend it all?”:

  • Serve with 4–5 general nodes and a host KV tier, and keep the rest as growth headroom that you can measure, not guess.
  • Fill the off-peak hours with batch or offline work on the idle nodes (the largest cost lever left).
  • Plan the second region (23.f) before buying more GPUs in the first, since a regional outage is the main threat to 99.9%.

The answer on one page#

ARCHITECTURE  8 nodes × 8 H100; TP=8 per node; 6 general, 1 long-context, 1 spare/canary.
              Gateway (auth, token and KV limits) → prefix-aware router with
              conversation affinity → engines.
CONFIG        FP8 weights and KV, prefix caching, chunked prefill with a 1,024-token budget,
              max_model_len 8,192, max_num_seqs 128, bounded queue.
RESULT        p95 ITL ~29 ms (40), TTFT for a new 4k prompt ~250 ms (500), 3.7× headroom.
DEPENDENCIES  1. FP8 quality, for speed and for cache capacity.
              2. Prefix-cache retention: conversation affinity, and prompts that keep a stable
                 prefix (no timestamps or request IDs at the top).
              3. Prompt length: doubling it halves headroom.
              4. Long-context traffic staying a small share, in its own pool.
MEASURE FIRST prefix-cache hit rate, running batch per node, p95 ITL, p95 queue wait,
              cost per million output tokens.
COST          $5.08/M output tokens on 64 GPUs; $3.81/M on 48 with 2.5× headroom.

6. Under the hood: the design calculator#

Go
// scenario.go — the capstone's arithmetic: a 70B chat service on 8×H100 nodes.
// A rough analytic model: calibrate a, b and tPre on your own hardware (19.d).
// Every number in the lesson's verdict comes from here; change an assumption and rerun.
package main

import (
	"fmt"
	"math"
)

// Hardware: H100 SXM, per GPU; one node = 8 GPUs at TP=8.
const (
	hbmBytes  = 80e9
	hbmBW     = 3.35e12    // bytes/s
	bwEff     = 0.70       // achieved share of peak bandwidth in decode
	allReduce = 160 * 7e-6 // 2 all-reduces × 80 layers × ~7 µs on NVLink (14.c)
	stepFixed = 0.001      // seconds: scheduler, sampling, launches per step (CUDA graphs on)
	memUtil   = 0.90       // --gpu-memory-utilization
	actBytes  = 4e9        // activations, CUDA graphs, workspace
	mfu       = 0.40       // achieved share of peak tensor FLOP/s in prefill
	gpus      = 8
)

// Model: a Llama-3.3-70B-class dense model (80 layers, 8 KV heads, head dim 128).
const (
	params     = 70.6e9
	kvPerTokBF = 2 * 80 * 8 * 128 * 2 // bytes per token, whole model, BF16 KV
)

type scenario struct {
	name           string
	users, turnSec float64 // active conversations; seconds between one user's turns
	in, out        float64 // mean prompt (with history) and output tokens
	hit            float64 // prefix-cache hit rate on prompt tokens
	nodes          float64 // nodes serving the general pool
	weightBytes    float64 // whole model
	kvBytesPerTok  float64 // whole model
	peakFLOPs      float64 // per GPU, dense, for the weight format
	offload        float64 // host-memory KV tier per node, bytes (0 = none)
}

type result struct {
	budget, batch, itl, itlP95, ttft, retainNeed, hit, prefillShare float64
	ok                                                              bool
}

// evalBudget models one node of the pool at a given max_num_batched_tokens.
func evalBudget(s scenario, load, budget float64) result {
	lam := s.users / s.turnSec * load / s.nodes // requests/s per node
	wGPU := s.weightBytes / gpus
	kvTokGPU := s.kvBytesPerTok / gpus
	kvFree := hbmBytes*memUtil - wGPU - actBytes
	ctx := s.in + s.out/2 // mean context of a request while it decodes
	a := wGPU/(hbmBW*bwEff) + allReduce + stepFixed
	b := ctx * kvTokGPU / (hbmBW * bwEff)           // extra step time per running request
	tPre := 2 * params / (gpus * s.peakFLOPs * mfu) // node seconds per prefill token
	// The prefix cache must keep every idle conversation's KV until its next turn.
	// If it cannot, the oldest are evicted and the hit rate falls (a rough LRU model).
	retain := s.users * load / s.nodes * (s.in + s.out) * kvTokGPU
	B, hit := 0.0, s.hit
	var f, k float64
	for pass := 0; pass < 3; pass++ {
		hit = s.hit * math.Min(1, (kvFree-B*ctx*kvTokGPU+s.offload/gpus)/retain)
		f = lam * s.in * (1 - hit) * tPre // share of time spent on prefill
		k = lam * s.out / (1 - f)
		if hit < 0 || f >= 1 || k*b >= 1 {
			return result{budget: budget}
		}
		B = k * a / (1 - k*b) // Little's law: running = arrival rate × time each
	}
	step := (a + b*B) / (1 - f) // mean step time = mean ITL
	chunk := budget - B         // prefill tokens that fit beside the decodes
	if chunk < 64 {
		return result{budget: budget}
	}
	stepP95 := a + b*B + chunk*tPre                       // a step carrying a full prefill chunk
	steps := math.Ceil(4000 / chunk)                      // a new, uncached 4,000-token prompt
	ttft := 0.025 + 0.010 + 0.004 + 0.100 + steps*stepP95 // RTT, gateway, tokenize, queue allowance
	return result{budget, B, step, stepP95, ttft, retain / kvFree, hit, f,
		stepP95 <= 0.040 && ttft <= 0.500}
}

// eval picks the token budget with the lowest TTFT that still meets the ITL objective.
func eval(s scenario, load float64) result {
	best := result{}
	for _, tb := range []float64{256, 512, 1024, 2048, 4096} {
		if r := evalBudget(s, load, tb); r.ok && (!best.ok || r.ttft < best.ttft) {
			best = r
		}
	}
	return best
}

// headroom: how far peak traffic can grow before an objective or the KV cache breaks.
func headroom(s scenario) float64 {
	lo, hi := 0.0, 50.0
	for i := 0; i < 50; i++ {
		if m := (lo + hi) / 2; eval(s, m).ok {
			lo = m
		} else {
			hi = m
		}
	}
	return lo
}

func main() {
	base := scenario{"base design (6 general nodes)", 10000, 180, 1200, 350, 0.75, 6,
		params, kvPerTokBF / 2, 1979e12, 0}

	fmt.Println("max_num_batched_tokens   batch   p95 ITL   TTFT (new 4k prompt)")
	for _, tb := range []float64{512, 1024, 2048, 4096} {
		r := evalBudget(base, 1, tb)
		fmt.Printf("%22.0f %7.0f %7.1f ms %9.0f ms\n", tb, r.batch, r.itlP95*1000, r.ttft*1000)
	}

	r := eval(base, 1)
	fmt.Printf("\nat peak: %.1f req/s; per node: batch %.0f, mean ITL %.1f ms, p95 ITL %.1f ms,\n",
		base.users/base.turnSec, r.batch, r.itl*1000, r.itlP95*1000)
	fmt.Printf("  TTFT (new 4k prompt) %.0f ms, prefill share of time %.0f%%\n", r.ttft*1000, r.prefillShare*100)
	fmt.Printf("  KV to keep idle conversations = %.0f%% of free KV memory, so hit rate %.0f%%\n",
		r.retainNeed*100, r.hit*100)

	mod := func(name string, f func(*scenario)) scenario { s := base; s.name = name; f(&s); return s }
	bf16 := func(s *scenario) { s.weightBytes, s.kvBytesPerTok, s.peakFLOPs = 2*params, kvPerTokBF, 989e12 }
	fmt.Printf("\n%-36s %9s %8s %6s\n", "scenario", "headroom", "budget", "hit")
	for _, s := range []scenario{
		base,
		mod("prefix hit rate falls to 20%", func(s *scenario) { s.hit = 0.20 }),
		mod("prompts double (2,400 tokens)", func(s *scenario) { s.in = 2400 }),
		mod("BF16 weights and KV, not FP8", bf16),
		mod("BF16 and hit rate 20%", func(s *scenario) { bf16(s); s.hit = 0.20 }),
		mod("one general node lost (5 left)", func(s *scenario) { s.nodes = 5 }),
		mod("general pool of 4 nodes", func(s *scenario) { s.nodes = 4 }),
		mod("general pool of 3 nodes", func(s *scenario) { s.nodes = 3 }),
		mod("3 nodes + 1 TB host KV tier each", func(s *scenario) { s.nodes = 3; s.offload = 1e12 }),
	} {
		r := eval(s, 1)
		fmt.Printf("%-36s %8.2f× %8.0f %5.0f%%\n", s.name, headroom(s), r.budget, r.hit*100)
	}

	// Cost: GPUs are paid all day; average traffic is a share of peak.
	const pricePerGPUh, avgOfPeak = 2.50, 0.45
	outTok := base.users / base.turnSec * base.out * avgOfPeak * 3600 * 24 * 365
	fmt.Printf("\noutput tokens per year: %.3g\n", outTok)
	for _, g := range []float64{64, 48} {
		perYear := g * pricePerGPUh * 24 * 365
		fmt.Printf("%2.0f GPUs: $%.2fM/year → $%.2f per million output tokens\n",
			g, perYear/1e6, perYear/outTok*1e6)
	}
}

Output:

max_num_batched_tokens   batch   p95 ITL   TTFT (new 4k prompt)
                   512      21    17.1 ms       293 ms
                  1024      21    28.5 ms       253 ms
                  2048      21    51.3 ms       242 ms
                  4096      21    97.0 ms       236 ms

at peak: 55.6 req/s; per node: batch 21, mean ITL 6.5 ms, p95 ITL 28.5 ms,
  TTFT (new 4k prompt) 253 ms, prefill share of time 6%
  KV to keep idle conversations = 89% of free KV memory, so hit rate 75%

scenario                              headroom   budget    hit
base design (6 general nodes)            3.68×     1024    75%
prefix hit rate falls to 20%             3.42×     1024    20%
prompts double (2,400 tokens)            1.92×     1024    46%
BF16 weights and KV, not FP8             1.53×      512    34%
BF16 and hit rate 20%                    1.39×      512     9%
one general node lost (5 left)           3.13×     1024    69%
general pool of 4 nodes                  2.50×     1024    55%
general pool of 3 nodes                  1.84×     1024    41%
3 nodes + 1 TB host KV tier each         2.59×     1024    75%

output tokens per year: 2.76e+11
64 GPUs: $1.40M/year → $5.08 per million output tokens
48 GPUs: $1.05M/year → $3.81 per million output tokens

How it works:

  • Little’s law with feedback. Running requests B = λ × output tokens × step time, and step time grows with B. Solving B = k(a + bB) gives B = ka ÷ (1 − kb); when kb reaches 1 the queue grows without bound.
  • Prefill steals time. If a share f of each second goes to prefill, decode steps stretch by 1 ÷ (1 − f).
  • The p95 step is a decode step that also carries a full prefill chunk (budget − B tokens). A new 4,000-token prompt needs ceil(4,000 ÷ chunk) such steps.
  • max_num_seqs is not applied. Near the headroom limit the modelled batch passes 128; a real server would queue instead, so treat the headroom figures as upper bounds and raise --max-num-seqs if the measured batch approaches it.
  • Cache retention is a rough least-recently-used model: if the KV of all idle conversations does not fit, the hit rate falls in proportion. Real eviction is less tidy; measure the hit rate.

The model leaves out queueing variance (it uses a fixed 100 ms allowance; 23.b simulates queues), the p95 tail of prompt lengths, and speculative decoding. It is for comparing designs and finding the binding resource, not for promising a number to a customer.


7. Performance implications#

  • Little’s law decides the batch. Fast decode means short requests and a small batch, so 70B on 8×H100 at this traffic runs at ~21 requests per node, far from the KV or bandwidth limits.
  • The token budget trades TTFT against ITL. Bigger chunks finish prefills faster but make every decode step that carries one slower. Size it from the ITL objective.
  • Cache capacity is throughput. Every point of hit rate removed is prefill added. KV precision, host offload tiers and conversation affinity are performance features here.
  • Speculative decoding (13.n) would lower ITL further, but ITL already has room; it would mostly shorten requests and so shrink the batch. Not worth the complexity at this load.
  • Disaggregated prefill and decode (14.j) pays off when prefill and decode fight. With a 6% prefill share, they barely meet.

8. Production implications#

  • Write the assumptions down (turn interval, lengths, hit rate, efficiency factors) next to the design, and check each one against production data in the first week (23.b).
  • Alert on the prefix-cache hit rate and on prompt-length drift, not only on latency: they warn before latency moves.
  • Keep prompts cache-friendly. A template change that puts something unique at the top of every prompt removes the hit rate in one deploy. Make it a rollout guard (23.g).
  • Gateway limits in KV terms (23.j) protect the general pool from a tenant with huge prompts.
  • Reconfirm FP8 on every model or engine change before shipping.
  • Size for the second region rather than for more headroom in the first.

9. Common mistakes#

  1. Assuming 10,000 simultaneous generations. Use Little’s law.
  2. “Memory is not the constraint” because the batch is small. The idle-conversation cache is.
  3. Using BF16 peak FLOP/s for an FP8 prefill, or forgetting efficiency factors altogether.
  4. Picking max_num_batched_tokens by habit. 2,048 breaks the ITL objective here.
  5. TP=16 or TP=64. Tensor parallelism across nodes puts every layer’s all-reduce on the network.
  6. No conversation affinity. The hit rate collapses and prefill grows several-fold.
  7. Not naming the critical dependency (FP8) and its fallback.
  8. Spending the whole budget without asking how much the design needs.
  9. Presenting the model’s output as a promise. Calibrate it, then measure.

10. Hands-on exercise#

  1. Run scenario.go. Change the turn interval to 60 s (more active users). What is the headroom, and what breaks first?
  2. Budget halved to 32 GPUs. Try 2 general nodes with and without a host KV tier, and with BF16. Which designs still meet the objectives, and with what headroom?
  3. TTFT objective 200 ms. The fixed costs are 139 ms. What token budget, hit rate or prompt length would you need? Is it reachable without a smaller model for short prompts?
  4. 100 fine-tuned variants with multi-LoRA (20.i). Which numbers in the program change, and how would affinity work when adapters and conversations both want stickiness?
  5. B200 instead of H100. Change the constants to 180 GB HBM, 8 TB/s and ~4.5 PFLOP/s FP8 dense per GPU. How many nodes does the same traffic need? At $6–10 per B200-hour against $2–3 per H100-hour, which is cheaper per million tokens?
  6. Write the design as a one-page document: diagram, configuration, objective analysis, dependencies, validation plan and cost. That is the deliverable in a real job.

11. Interview questions#

  1. Design a serving architecture for a 70B model, 10,000 concurrent users, 64 H100s.
  2. What is the first question you ask about “10,000 concurrent users”, and how do you turn the answer into a batch size?
  3. Which resource binds in this design, and why is it not the running batch’s KV?
  4. Why TP=8 and data parallelism, rather than TP=64?
  5. How do you choose max_num_batched_tokens from the objectives?
  6. What is the critical dependency, and what happens if it fails?
  7. The design costs $5/M output tokens. Why so high, and what would you change?

12. Further reading#

Checked on 13 November 2026.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in