Quanta

← Back to Briefings

Load Testing Claude Sonnet 5.5 at 300 Concurrent Users

Team playbooksEN3 reads

01 · What 300 Concurrent Users Put Through Your Integration

When a team lead prepares to launch a model-backed feature, the anxiety usually attaches to answer quality. In practice, launches break somewhere else. They break in the connection pool, in the retry logic, in a queue nobody sized, and in a cost line nobody modeled. A model that behaves perfectly for one engineer at a desk behaves very differently when three hundred users arrive in the same minute, each carrying a long conversation history and a full set of tool definitions.

Load testing before launch replaces that uncertainty with numbers. It is not a benchmark of intelligence. It is a rehearsal of your traffic shape against your budget shape, your rate limits, and your failure handling. Done well, it answers three questions before real users answer them for you: how much sustained load the integration can carry, what that load costs in metered tokens, and which component fails first when something goes wrong.

For teams running heavy, sustained workloads, the third question matters most. High-quality answers at low concurrency prove very little. What matters is behavior under steady pressure, where small inefficiencies compound. A context block longer than it needs to be, a cache that is never populated, a retry that turns one slow request into five, a per-request JSON payload that inflates the metered total by a few hundred tokens every single call.

  • › Concurrency: how many in-flight requests your integration sustains without queuing or dropping work.
  • › Payload shape: system prompts, tool schemas, retrieval blocks, and history, measured the way the meter counts them.
  • › Cost ceiling: the token spend per hour and per user session that the team has agreed to absorb.
  • › Degradation: what users see when upstream latency climbs, and what the system does instead of hanging.

02 · Build Test Traffic From Your Own Traces, Not From Averages

The most common mistake in pre-launch load testing is driving synthetic traffic that looks like a smooth average. Real traffic is spiky and lopsided. A support queue releases a batch of long cases at the top of the hour. An internal automation sends thousands of short, cheap calls overnight. A small number of power users generate a disproportionate share of tokens because their sessions are long and their context is heavy. If your test does not reproduce those shapes, your pass result is a fiction.

Start by exporting a week of real or representative requests and classifying them into three profiles: short and frequent, long-context and expensive, and bursty batch work. Then build your test mix from those profiles rather than from a uniform random generator. Preserve the distribution of input and output lengths, because output length drives both latency and metered cost. If you run a tool-using agent, preserve the number of tool round trips too, since each round trip is its own call with its own metered tokens.

Model choice changes the economics of the test, so keep it deliberate. If your launch traffic is interactive and latency-sensitive, a fast, economical model is the obvious baseline; if the work is deep reasoning on long contexts, a heavier profile is the honest one. Use one or two models as fixed reference points during testing so that cost and latency comparisons stay meaningful across runs.

Three passes are usually enough to get useful numbers. First, a warm pass to populate caches and establish steady-state behavior. Second, a ramp that climbs from a handful of concurrent users to the full target while you watch latency, error rate, and spend. Third, a soak that holds the target load for long enough to expose leaks, memory growth, connection exhaustion, and creeping queue depth.

03 · Meter Real Tokens, Cache Writes, And Cache Reads Separately

Before you run the ramp, decide what the cost test is measuring. A load test that reports only requests per second tells you nothing about the invoice, and a token estimate built from character counts will mislead you. What you need is the real token accounting for the calls you are about to make, broken out by direction and by cache activity.

Prompt caching is the highest-leverage variable in most sustained workloads. A stable system prompt, tool definitions, and retrieved reference material can be written to cache once and read on every subsequent call. Cache writes and cache reads are billed as distinct line items, and the arithmetic is straightforward: the first call of a session pays the write, and every later call pays the much cheaper read. Load tests that reset state between requests, or that randomize prompts enough to defeat cache reuse, will show a cost profile that no real user will ever produce.

This is one of the reasons teams with heavy, sustained workloads route through Quanta. Every call is metered on real tokens, with cache writes and cache reads priced separately, so the numbers your load test produces are the numbers your billing produces. One balance covers the models on your shortlist, which means a single cost test can cover a fast interactive tier and a heavy reasoning tier without switching accounts or reconciling two invoices. It works with Claude Code, Codex, Gemini CLI, and any OpenAI SDK, so you can load test the exact code path that will serve traffic after launch rather than a rewritten approximation of it.

Instrument the test to capture, per request, input tokens, output tokens, cache write tokens, cache read tokens, latency, and whether the call succeeded. Aggregate those into cost per user session and cost per unit of work. Those two numbers are what your finance conversation will actually be about.

04 · Rehearse The Failures You Expect To See After Midnight

A load test that only proves the happy path is not a load test. Before launch, deliberately break things and watch what your integration does. Inject upstream latency. Return partial responses. Force rate limiting on the fastest endpoint. Kill the connection mid-stream. In each case, verify three behaviors: that the user gets a bounded, comprehensible outcome; that the system does not multiply the damage through retries; and that the failure is visible in your logs and metrics within moments.

Retry storms deserve special attention. A naive retry with no backoff, applied to a saturated upstream, converts a slow minute into a full outage and inflates your token spend with calls that never complete useful work. Cap retries, add jitter, set deadlines that are shorter than your user-facing timeout, and make requests idempotent wherever the workload allows.

Rate limits are the other predictable pressure point. Sustained workloads sit close to their ceiling by definition, so test what happens when you reach it. The right response is graceful: queue briefly, shed the least important work first, degrade to a shorter context or a lighter call, and surface a clear status to the operator. The wrong response is a silent slowdown that users experience as the product being broken.

Finally, measure tail behavior. Median latency hides the pain. Record the slowest few percent of calls, because those are the requests that fill your support queue and, in streaming interfaces, the ones that stall a user mid-sentence. If your tail latency grows with session length or context size, that is a design finding, not an operational nuisance.

05 · Write The Launch Gate As Numbers The Team Signs

Turn the results into a gate with explicit thresholds, agreed in advance and written down. A gate is not a vibe. It is a short list of conditions that, if unmet, stop the rollout, and it should be specific enough that a new team member can evaluate it without asking anyone.

  • › Sustained capacity: the concurrency the integration holds for the duration of the soak with error rate inside tolerance.
  • › Latency budget: the tail latency target at that concurrency, measured against real token volumes.
  • › Cost envelope: the metered spend per session, including cache writes and cache reads, with a hard hourly ceiling.
  • › Failure behavior: verified backoff, bounded retries, and graceful shedding under injected faults.
  • › Rollback path: the switch, flag, or configuration change that returns the system to its pre-launch state in minutes.

Then stage the rollout anyway. Move from an internal cohort to a small user slice, then to a larger one, watching the same metrics you measured in the test. Real traffic will find profiles your traces did not contain, and the point of the gate is to catch those early, at small scale, when the fix is cheap.

One practical note on cost during this period: keep a single metered balance and a single set of token records across the entire rollout. When the interactive tier and the heavy tier are priced on the same real-token accounting, you can tell immediately whether a cost spike comes from traffic growth, context inflation, or degraded cache reuse, and you can act on the right one. If your team is preparing for a heavy sustained workload, open an account with Quanta and run the full rehearsal against real metered calls before the first external user arrives.

Load testing is not a ceremony you perform to check a box. For a team that runs heavy workloads, it is the cheapest possible way to find out whether your launch is an engineering event or a budgeting event. Run it with real shapes, real tokens, real failures, and written thresholds, and the launch becomes a rollout rather than a gamble.