Step 10 of 15Method

Measure what a caller waits

Through the gateway, a client that obeyed the retry hint got its first token at 150.3 s, and one that retried every 5 s at 45.6 s. The model was Ready at 41 s.

Obeys Retry-After
150.3 s
Retries every 5 s
45.6 s
Model Ready
41 s

From the request to the first token, seconds

Client obeys Retry-After: 150
150.3 s
Client retries every 5 s
45.6 s

the model reports Ready. a 503 sent to the caller. the first token. Nine 503s, then the first token at 45.6 s: Ready, plus up to one polling interval, plus the first token. Fast, but only for a client written to retry.

The same cold start, seen by two clients. Pick a client to see what it went through.

Problem

Every number so far stopped at the model. Callers go through the gateway, which answered a cold request with a 503 and a Retry-After header.

Change

An end-to-end mode for the harness. It scales the model to zero, sends a streaming request through the gateway, follows the 503s in one of two client styles, and times the first token. Three runs per client.

Result

The model was Ready at 41 seconds. A client that obeyed Retry-After: 150, a value sized for the old start, got its first token at 150.3 seconds. A client retrying every five seconds got it at 45.6. A warm request took 0.06 seconds, and runs agreed within a few hundredths of a second.

Decision

The deciding number became a real client's wait. The stale retry hint was costing a well-behaved caller about 109 seconds.