Northwood AI Alert – Rogue AI agents and zero-day exploitation. Read more…Client Portal

Engineering brief

Designing infrastructure for production AI inference

A framework for sizing model-serving infrastructure against response quality, tail latency, and the cost of useful work.

In this article

Define the unit of work

A document extraction service and an interactive assistant can use the same model and still need different infrastructure. The extraction service may have several minutes to complete a batch. The assistant has a person waiting for its first useful response. Write down how requests arrive, how long inputs and outputs tend to be, what counts as a successful response, and which requests can queue.

Include representative requests at the upper end of normal input size. If the application retrieves documents, measure retrieval and permission checks in the same test. A fast model benchmark cannot account for a slow search or an unavailable identity provider.

Measure the service at normal and peak load

Collect time to first token, end-to-end latency, and the number of successful requests during a fixed interval. Compare the median with a tail percentile such as p95. Test long requests mixed with short ones, then repeat with a serving instance unavailable. Record queue growth, retries, and requests that time out.

For an illustrative workload, 120 accepted requests per minute at steady load may fall to 85 after a replica is lost. If the application still receives 100 requests per minute, its queue will grow even though individual requests continue to complete. Decide whether to defer batch work, provide a simpler response, or reserve more capacity.

Budget for accepted responses

Divide the measured cost of a test interval by the number of responses that meet your acceptance criteria. Include idle capacity, storage, networking, and the application services that sit outside model serving. Keep model version, prompt mix, and quality checks constant when comparing two configurations.

Document who can approve a model change, how to roll it back, and how to handle failures. Review retention for prompts, retrieved documents, and output logs. Treat changes in data access or model behavior as release decisions that require testing.

Further reading

Related publications

View the library