Follow one request to the GPU
Lesson 1 of 28 · Follow the request · 3 min · Free Watch this lesson freeSay Maya is the engineer who just launched an AI support assistant for a small online shop. Her first complaint comes in from a customer, Dan.
His first question got a quick answer, but his follow-up sat there for ten long seconds. Maya's dashboard says everything's fine, so what on earth happened?
Follow the question
To find out, let's follow Dan's question the whole way, from his browser to a GPU, a chip built for heavy math that costs real money to rent. It crosses five stops on the way, and every problem Maya hits later happens at one of them.
It starts in Dan's browser and reaches the gateway, the front door, which checks who he is and makes sure nobody's sending too much. Then it goes to the agent service, the part of Maya's code that decides what to ask the model.
Next the question heads for the model server, but a router in front decides which copy gets it. Maya runs several identical copies, which we call pods, and the pod the router picks has the model loaded in GPU memory.
Nothing comes back as one finished answer. The model makes one small piece of text at a time, a token, roughly a word, and each piece streams back along the same road. That's why Dan sees the first words long before the last ones exist.
So the connection stays open for seconds, sometimes minutes, and every stop has to pass each piece along the moment it arrives. If one stop waits for the whole answer, Dan stares at a blank chat box, and you've been there too. That would explain a freeze, so Maya checks, and the stream is fine.
An ordinary request
Which leaves the copies. A product page is easy: it takes a few milliseconds, and any copy of the shop's website can serve any visitor, so a load balancer just spreads them around and nobody cares which copy gets whom. Maya's used to that, and so are you.
This request is different
Dan's question takes seconds, and while it runs it ties up a slice of a very expensive GPU, so Maya can't just throw more visitors at it and hope, and neither can we.
And the copies aren't interchangeable. Dan's first question went to one pod, and that pod had already worked through his chat. His follow-up landed on a different pod with no memory of it, so it had to read everything again first. That's the freeze, and you'd never spot it from requests per second.
What changes
So Maya stops watching requests per second, which looked fine the whole time. She watches how many tokens are flowing, how much GPU memory they take, and which pod each chat lands on. You'll be watching the same three.
Next time a chat goes quiet for ten seconds, don't start with the model. Start with the path. Where's the question waiting, and what for? That's what we'll measure next, with time to first token and the wait between tokens.
This is the narration of a video lesson from Run AI in production on Kubernetes. In the video it is animated, and you can pause it to ask a question.