CertPrep
Domain 2 · Lesson 2.2 · 7 min read

Scale and Throughput

Exam skillScale and Throughput Management

Analyzing rate-limit strategy, queueing and backpressure, batch pipeline design, multi-tenant quota and isolation, and capacity planning for high-volume Claude workloads, and identifying whether rate limits, token throughput, or batch economics is the binding constraint.

Work out which constraint binds a high-volume Claude workload (requests, input tokens, output tokens, or batch economics), then apply the matching lever, from caching and routing to queues with backpressure, batch processing, workspace limits and per-tenant quotas.

What you need to know

Throughput problems look alike from the outside (429 errors, growing queues, slow responses) but have different causes. The exam gives you the numbers and expects you to do the arithmetic before choosing a fix.

Find the binding constraint

Rate limits are measured per model in requests per minute, input tokens per minute and output tokens per minute. Compute each against its limit:

Binding constraintLevers
Input tokens per minuteCache stable prefixes; trim context per request; route high-volume steps to another model
Output tokens per minuteRight-size outputs; move long generation to batch
Requests per minuteCombine independent calls; queue and smooth bursts
Cost per token on offline workMessage Batches API
Latency requirementReal-time requests, even when batch would be cheaper

Sudden ramps

Limits are enforced continuously, and a jump from near zero to thousands of requests within seconds can be limited even below the per-minute ceiling. Ramp new traffic gradually and honor retry-after while doing so.

Queues and backpressure

A queue absorbs bursts and lets workers send at a steady rate within the limits. When demand stays above capacity, an unbounded queue only converts load into latency until the work is useless. Backpressure means:

  • a bounded queue;
  • rejecting or deferring new work when it is full, so producers slow down;
  • expiring items older than their usefulness;
  • priority for work with a user waiting over background work.

Adding workers does not create rate-limit capacity.

Batch processing

The Message Batches API processes requests asynchronously and costs less per token, with results returned when each batch completes (often well within an hour, but not guaranteed to be fast). It fits catalog generation, nightly re-scoring, large evaluation runs and backfills. It does not fit work with a freshness target of minutes. Each result carries its own outcome: an ended batch can still contain errored or expired requests, which the pipeline must resubmit or report.

Isolation for tenants and workloads

MechanismWhat it isolates
Workspaces with their own rate and spend limitsWorkloads within the organization (production chat versus experiments)
Per-tenant quotas at your gateway (token buckets for requests and tokens)Customers of a multi-tenant product
Fair scheduling across tenantsOne tenant's burst from everyone else's latency
Metering against plan allowances before the callPlan caps, enforced before shared capacity is used

API keys within one workspace share its limits, so one key per tenant does not isolate tenants. Monthly invoices and daily resets do not enforce anything during the day.

Capacity planning

Forecast demand in the units limits use, and model tokens per unit of work, not just users:

  • sessions times tokens per session (input uncached, input cached, output) per product line;
  • planned feature launches and their effect on tokens per session (a new agent feature can multiply them);
  • peak-to-average ratios and holiday multipliers.

For a peak above current capacity, reduce what each request consumes on the constrained model (caching, trimming) and move high-volume, simple steps to a smaller model with separate limits.

In the exam

Throughput items give rates, sizes and limits. Compute each constraint, identify the one that binds, and pick the lever for it. Check whether the workload can wait (batch) or needs isolation (workspaces, gateway quotas). Distractors add workers, rotate keys, retry harder, rebuild the index twice as often, or choose by cost when latency is the requirement.

Check your understanding

Question 1

Request counts are flat, but average input per agent request grew to 120,000 tokens and 429s appeared. What binds?

Show answer

Answer: B. Growth is in tokens per request, so less input per request relieves the limit. Requests and output did not change.

Question 2

One tenant's bulk import consumed the shared limit and others got 429s. Which control isolates tenants?

Show answer

Answer: C. Isolation must be enforced per tenant before shared capacity is used. Keys in one workspace share limits, and any shared ceiling can be exhausted.

Question 3

A news service must summarize articles within 10 minutes of publication. Why not batch?

Show answer

Answer: D. Batch is cheaper but asynchronous. When latency binds, the cheaper option only matters if it meets the requirement.

Apply it: Plan Tidewater's Monday peak

Exercise · about 30 minCase: Tidewater Analytics

Tidewater peaks at 1,800 requests a minute on Monday mornings. Each request averages 9,000 input tokens (6,000 of them the shared system prompt and tools, cached only 22% of the time) and 700 output tokens. Assume limits of 6,000,000 input tokens and 900,000 output tokens per minute. Last Monday, one tenant's bulk report job took most of the limit for two hours.

  1. Compute uncached input and output per minute at peak, now and with the cache working on 90% of requests.
  2. Name the binding constraint in each case.
  3. Design tenant isolation that would have prevented last Monday.
  4. Decide where the bulk report job should run.
Check your work
Show model answer

1. Arithmetic

Uncached input per minuteOutput per minute
Now (22% cached)1,800 x (3,000 + 6,000 x 0.78) = 13.8 million1,800 x 700 = 1.26 million
With 90% cached1,800 x (3,000 + 6,000 x 0.10) = 6.5 million1.26 million

2. Binding. Now, input tokens (13.8M against 6M) and output (1.26M against 0.9M) both exceed their limits; input is the worst. With caching fixed, input is close to the limit and output still binds, so output must also come down (shorter answers where full length is not needed) or move partly to batch.

3. Isolation. The gateway enforces per-tenant token buckets sized by plan, with fair scheduling across tenants so no tenant can take more than a set share of throughput while others are waiting. Bulk and report jobs go through a separate workspace with its own, lower limits.

4. Bulk reports. They have no user waiting, so they run through the Message Batches API from the separate workspace, with each result's status checked and failures resubmitted.

Key termsMessage Batches APIPrompt templateToken

Sources