648 calls against a 600 cap: the design broke on arithmetic nobody did
The design review was in week two, and the room was confident. Two weeks of work on Relay, a triage agent for a regional health system, and the sketch on the wall looked clean: patients write into the portal, the agent reads the message, pulls a summary from the health record, books an appointment or escalates. Nobody had a question. Then Ruth, the lead architect, asked one: who owns the health record interface, and what happens when it slows down?
Silence. The vendor contract named a team that had been reorganised away a year earlier. Nobody knew who could approve a change. And the sketch rested on a guess nobody had written down: that the record system answers instantly, and without limits. It does neither.
This is the failure mode that kills more AI designs than any bad prompt. Not the model. The map. The team designed a system that talks to four other systems and never listed them, their limits, or their failure behaviour. Two weeks of design work rested on guesses, and the sponsor's follow-up was the right question: what else in the plan is a guess?
Before the design, make the list
The fix is unglamorous, which is why it gets skipped: before the design hardens, build an integration inventory, one row per system, the same eight fields for each.
What it does, in one plain sentence. Its API style: REST, vendor API, batch extract, webhooks, or some mix. How callers prove who they are. A named owner. The rate limit, its unit, and who shares it. What kind of data flows. What the system announces. And how it fails: timeouts, retries, error shapes, and what callers see when it is down.
A blank field is a finding, not a detail: a question to close before build, while closing it is still cheap. An inventory with its gaps visible and owned is honest. One with blanks nobody noticed is a design built on air.
Four systems, one cap
Northgate, the made-up health system in this chapter, has four systems. The health record is old and central, reached through a vendor API capped at 600 calls per minute, plus nightly batch extracts. Scheduling is newer, with a clean REST API. The service desk takes escalations and offers an API plus webhooks. The portal is where messages start.
Relay sits between the portal and the systems, with Atlas, the gateway from the next chapter, between Relay and everything it touches. Every call counts against the 600 per minute, shared with the record system's other users.
Two gaps hide in the diagram: the service desk tool is missing, so escalations leave Relay sideways, and the nightly batch extract never appears, yet for bulk data it may be the safest route off a capped API.
The arithmetic nobody did
Here is the number that ended the design review. Northgate handles 260,000 portal messages a month, and the naive Relay sketch makes 4 record-system calls per message. Can it stay under the 600 cap?
Start with the monthly average, the number everyone quoted: 260,000 messages times 4 calls, spread over a month, is about 6 calls a minute. Six against a 600 cap. Harmless.
Averages hide peaks, and caps are enforced at the peak. Step one, daily volume: traffic lands mostly on weekdays, so 260,000 divided by 20 weekdays is 13,000 messages per weekday. Step two, the morning surge: a quarter of the day arrives in the 8 to 9 am hour, after reminder notifications go out, so 13,000 times 0.25 is 3,250 messages in that hour, about 54 a minute. Step three, peak minutes: messages arrive in bursts, so assume the worst minute runs at three times the surge-hour average, 54 times 3 is 162 messages. Step four, calls against the cap: 162 times 4 is 648 calls in that minute. The cap is 600. The naive design breaks it, before retries, and before the record system's other users take their share.
That is the whole lesson in one calculation. The monthly average said 6 calls a minute. The peak minute said 648. The design was approved on the first number and would have failed on the second, in production, on a Monday morning.
The fix is also arithmetic. Halve the calls per message and the peak minute drops to 324, comfortably under the cap. Or move bulk reads to the nightly batch extract, which never touches the live API. Both options appear once the inventory records calls per message next to the cap. Neither appears from the average.
Failure behaviour is part of the surface
Two systems with the same API style can fail very differently. The record system is slow under load and answers errors as vendor codes. Scheduling has clean REST errors, fast timeouts, and reads that are safe to retry. The service desk announces new tickets by webhook, and if a webhook has no retry, a missed delivery is a lost escalation.
The security lead reads the data classes column first: a flow marked wrong there is a review blocker, not a typo. In the chapter's lab you fix an extract with four such faults: a blank owner, a cap written as 6,000 instead of 600, patient summaries labelled as scheduling data, and a webhook that delivers once and is always fine. Each looks like paperwork and behaves like an outage.
The rule to take with you
No design decision rests on an inventory field that is blank or guessed. Close the gap, or design so the gap cannot hurt you. List every system, record the same eight fields for each, and do the peak arithmetic, not the average. Then build.
The full interactive chapter is free at https://deployedlab.dev/lessons/ccap-03-integration-surface-map, with the hands-on lab where you build the inventory, then break one. There are 79 chapters free with no signup across the bundle, and the full bundle is $5 a month or $39 a year at https://deployedlab.dev.