Log inStart free
LESSON 33.C2 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Load balancers on LLM traffic

Eight routers send the same 20 chat requests to 4 replicas.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 33.C2 · ROUTER BAY20 REQUESTS · 10 SHARED PREFIXES · 1 PER 250 MS
01
Stage 1 of 5 · Requests arrive
Twenty requests arrive, one every 250 ms. Ten start with the same 1,200-token system prompt.
Explain it simply

Each block on top is one request, placed at the time it arrives. Its height is the prompt length, and the solid part is the shared system prompt. The letter under a block is the zone the user is in.

A strip of 20 request blocks, one every 250 ms. Ten blocks have a solid shared part of 1,200 tokens. Four lanes below: W1 and W2 in zone A, W3 and W4 in zone B.

request, prefillwaitrouter signal, cached prefixzone hopworst TTFTfirst token, mean TTFT
0123456time, sW1zone AW2zone AW3zone BW4zone BBAAR04ABBBBAABBABAAAAAAthe requestsarrivalsuser zoneshared 1,200 tokensown tokensR04: 1,392 tokens = 1,200 shared + 192 own · zone A0123456time, sW1zone AW2zone AW3zone BW4zone BBAAR04ABBBBAABBABAAAAAAthe requestsarrivalsuser zoneshared 1,200 tokensown tokensR04: 1,392 tokens = 1,200 shared + 192 own · zone A
Toy: the 33.C2 traffic, 20 requests on 4 replicas in 2 zones
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
prompti=1200+useri\sy{p}{data}{\text{prompt}_i} = \sy{c}{param}{1200} + \sy{u}{data}{\text{user}_i}
prompt1=1200+184=1384\text{prompt}_{1} = 1200 + 184 = 1384

A shared prompt is the 1,200 shared tokens plus the user part.

Common mix-ups

MYTHLeast loaded and KV-aware routing read the same thing.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With a request every 250 ms, does token-aware routing beat round robin on mean TTFT?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.