Deployed Lab

Module 1 · AI workloads on your platform · Chapter 01 · Free

Why AI workloads break ordinary platform habits

20 min1 clickable picture1 hands-on lab1 predict, 2 quick quizzes, 5-question final quiz5-min video review
In 30 seconds

The picture: a web tier is a row of checkout tills. An inference tier is a small kitchen where each order occupies a cook until done.

What this chapter gives you
The cold open

Copperline is a made up B2B SaaS company. On launch morning its support copilot goes live for Ana, the support lead. At 9 a.m. traffic arrives, all figures here illustrative.

Nothing was broken in the ordinary sense. The workload was different. This chapter names the differences.

The plan for this chapter
  1. Differences 1 and 2: long stateful requests, and the GPU as scarce resource.
  2. Differences 3 and 4: token shaped load, and heavy cold starts.
  3. Differences 5 and 6: quality as a signal, and cost that scales with success.
  4. The picture, then both tiers under the same spike.
  5. A lab: match six surprises to the habit behind each.

Next: why a request is not a quick visit.

Step 1: Requests are long and stateful, not quick and stateless

A web request arrives, replies in milliseconds, and frees everything. An inference request generates text token by token, often for seconds, and the engine holds state for it throughout.

Think of each request as a phone call, not a letter: the line stays open. Where the picture breaks down:

Next: why the GPU fills first.

Step 2: The scarce resource is GPU memory and compute

On a web tier you watch CPU and RAM, which subdivide neatly: ten small containers share one node. A GPU does not split so politely by default. Weights take a large fixed block of GPU memory, and what is left holds the KV caches of live requests.

Next: why request counts mislead.

Step 3: Load is token shaped, not request shaped

Two requests are not equal load. A short question is cheap. A long document question holds a slot and cache far longer. Load follows tokens and time, not request count.

Next: the heavy start behind launch morning.

Step 4: Cold starts are heavy, so new capacity arrives late

A web container starts in seconds and serves at once. A serving pod must pull and load model weights, often many gigabytes, into GPU memory before the first token. That can take minutes, on every new pod.

Next: the signal health checks miss.

Step 5: Quality is an operational signal, not only a product concern

A web deploy that is up and fast is usually fine. A model or prompt deploy can be up, fast, and wrong: fluent answers citing the wrong policy. Copperline learned this when a help article edit changed copilot answers with no code deploy.

Next: the difference Greg will ask about.

Step 6: Cost is per request, and it scales with success

A cached web page costs almost nothing per view. Every copilot answer spends GPU seconds, and longer answers spend more. If usage doubles, the GPU bill roughly doubles too. Greg, Copperline's finance partner, asked why a popular feature costs more than an unpopular one. This is why.

Predict first:

It gets worse. Readiness that checks only the process sends requests to pods with no model loaded. The queue grows until weights load or traffic is pinned back to warm pods.

Next: the picture, one request through the serving tier.

Step 7: The picture, one request through the copilot tier

Press Next to walk one request.

One request through an inference tier A user request passes a gateway to a serving engine on a GPU. The engine holds a KV cache per live request while it generates tokens back to the user. Userasks a question Gatewaylong connection Engineon one GPU KV cacheper live request Tokensstreamed back
  1. The question arrives and the connection stays open for seconds, not milliseconds, while the answer is generated.
  2. The gateway routes to an engine with a free slot. Timeouts and draining must respect full generation time.
  3. Each live request keeps a KV cache in GPU memory. It grows per token and frees only when the answer ends.
  4. The user sees words as they are made. Slot, cache, and cost all run until the last token.

Next: the same spike, two tiers, in numbers.

Step 8: Worked example, web tier versus copilot tier in one spike

A launch sends both tiers the same spike: 600 extra requests in one minute, an illustrative 10 per second. All figures here are illustrative.

1. The web tier. Each request takes 0.2 seconds. Live requests: 10 per second × 0.2 seconds = 2. Two slots carry the spike, and one small pod has room to spare.

2. The copilot tier. Each answer takes 8 seconds. Live requests: 10 per second × 8 seconds = 80. The same spike needs 80 slots, each holding KV cache on a GPU.

3. The slot count. If one engine, illustratively, runs 20 live requests at once, the spike needs 80 ÷ 20 = 4 warm engines. Copperline had 2, so 40 requests queue, however healthy the CPU graph looks.

4. The scaling trap. Adding 2 engines helps only after weights load, illustratively 4 minutes. Sent traffic early, they add queue, not capacity: the launch morning failure.

5. The cost line. At an illustrative price of $2.50 per GPU hour, 4 engines cost 4 × $2.50 = $10 per hour while the spike lasts. Web pods for the same spike cost a fraction of that, since their requests end in 0.2 seconds.

The traffic was identical. Duration per request made the load 40 times larger, on the expensive resource.

Next: the lab, naming each habit.

Step 9: Hands-on lab, match the surprise to the habit

Why this exercise: incidents arrive as surprises, not labels. Naming the habit points at the fix.

Do this:

Lab: Copperline ran its support copilot, document extraction pipeline and internal coding agents on ordinary web habits, and production sent back twelve surprises. This lab runs in your browser and needs JavaScript enabled.

What to notice

Next: a field note, then mix-ups.

Field note, November 2026

Platform teams adopting inference commonly report the same first lessons: readiness probes that check real generation, GPU memory as the primary capacity graph, and warm replica floors for known peaks. Treat these as shared practice, not measured statistics. Engines in this category, such as vLLM, TensorRT-LLM and SGLang, exist largely to manage batching and cache memory well.

Mix-ups to avoid

Chapter quiz

Score 70% to complete.

Review this chapter in 5 minutes

Watch the whole chapter recapped: six differences from web work, GPU first sizing, real token readiness, and the forty times spike.

Decision rule: before applying an ordinary platform habit to an AI workload, check it against the six differences, and change it where one bites.

Review

Glossary

Inference
Running a trained model to answer a request. Example: the copilot generating a reply.
KV cache
Stored attention data kept per live request so past tokens are not recomputed. Example: it grows as an answer lengthens.
Token
A chunk of text the model reads or writes, roughly part of a word. Example: a long answer is hundreds of tokens.
Cold start
Delay before a new pod can serve, here dominated by loading weights into GPU memory. Example: minutes, not seconds.
Serving engine
Software that runs the model and manages batching and cache. Example: engines in this category include vLLM.
Readiness
Whether a pod may receive traffic. Example: passing only when it returns a real token.
Quality signal
A measured score of answer correctness over real questions. Example: a fixed set rescored on every deploy.
GPU memory
Memory on the graphics processor where weights and caches live. Example: the first limit an inference tier hits.

Next: "The reference serving stack: from request to token".