Log inStart free
LESSON 33.C4 · 6 STAGES · 3 CONTROLS · 2 CHECKSPRO · PREVIEW

One request through the platform

Follow one streamed chat request from the client to the GPU and back.


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

Go Pro · $8.25/mo
EXPLAINER · 33.C4 · PLATFORM BAYR25 AT THE GATEWAY AFTER 40 MS
01
Stage 1 of 6 · Gateway and auth
After 40 ms, R25 reaches the API gateway, which ends TLS and reads it. Auth finds key K1 in the key table.
Explain it simply

R25 is one short chat message from the chat app, with the key K1. It travels for 40 milliseconds to the API gateway, the one front door of the platform. The gateway unlocks the encryption, so it can read the path, the key and the token counts. Auth looks up the key and finds the chat app.

Three client boxes on the left, K1 chat app, K2 batch job and K3 flood. R25 sits in the API gateway box. The auth box shows key K1 accepted.

requests and spanslimits and queued workpicked replica; streamed tokensrejected (HTTP 429)waiting in a queue
replicas at 13.007 sK1 chat app15 requestsK2 batch job12 requestsK3 flood40 requestsAPI gateway33.25L7 proxy · ends TLSPOST /v1/chat, key K1608 + 256 tokensauth · 3 mskey K1 ✓ chat approuter33.12token-awareW1W2W3W4R25trace of R25024681012141618 sclientgatewayauth3 mssend and check the key33.17R25 leaves at 12.96 s · 40 ms one way · at the gateway at 13.00 sreplicas at 13.007 sK1 chat app15 requestsK2 batch job12 requestsK3 flood40 requestsAPI gateway33.25L7 proxy · ends TLSPOST /v1/chat, key K1608 + 256 tokensauth · 3 mskey K1 ✓ chat approuter33.12token-awareW1W2W3W4R25trace of R25024681012141618 sclientgatewayauth3 mssend and check the key33.17R25 leaves at 12.96 s · 40 ms one way · at the gateway at 13.00 s
Toy: 67 requests in 30 s from 3 API keys, 4 GPU replicas, R25 followed
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
tgw=tsend+d\sy{tg}{data}{t_{\text{gw}}} = \sy{ts}{data}{t_{\text{send}}} + \sy{d}{param}{d}
12.96+0.04=13.00 s12.96 + 0.04 = 13.00\ \text{s}

The request reaches the gateway one network trip after it leaves.

Common mix-ups

MYTHR25 is slow because the GPU is slow.

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

Predict, then reveal
2 CHECKS · PRO
Q01With token-aware routing and FCFS, does R25 wait longer if the rate limit is off?

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

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 2 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.