Reliability and Cost Engineering
Language AI HandbookAll chapters A support assistant can miss its two-second deadline even when every dependency eventually succeeds. A search call waits in a queue, the model has to retry, and the fallback arrives after the user has left. Those attempts still consumed capacity, and billable calls can incur charges even when the user never receives a useful answer.
For sequential calls, the mean of the sum equals the sum of the means. You generally cannot add the component medians or p99s to get the corresponding end-to-end percentile. Consider two independent steps, each taking one second on 60% of requests and nine seconds otherwise. Each has a one-second median, but together they finish in two seconds only 36% of the time. The end-to-end median is ten seconds. How long calls coincide on the same requests matters.
We'll define a service-level objective, look at when retrying helps, and use seeded examples to connect queueing, cache errors, and model spend. A final fault-injection example puts those decisions together under a shared outage.
The earlier chapters in Compound AI System Design introduce routing and tracing. Production Systems covers their serving context, including autoscaling and caching.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!