The client's architect says it will crash. Load-test it together
Agree on pass/fail thresholds, environment and scenarios before anyone presses run, and your toughest critic becomes co-author of the result.
In brief
- Stop arguing about whether the system will crash. Work with the client to write down how you will measure where it does.
- Fix the thresholds, use a production-like environment with enough data, and test each component before the whole system.
- Push load past expected levels, measure recovery as well, then record the decision in an ADR.
Forty minutes into an architecture review, the client’s chief architect folds his arms. You have just presented the design of a document search service to be deployed on the client’s side. “Every request goes synchronously through one database,” he says. “At peak hours it will crash.”
You believe the design is sound; he believes it will fall over. You are arguing about something that has not happened yet, so neither of you can win with words, and every extra minute of argument costs you some of the client’s trust.
Arguing better solves nothing. Instead, invite him to help design the very test that could prove him right. This skill separates a good FDE from someone who only writes code: turning a disagreement into an experiment whose scoring both sides agreed on in advance.
Why does a test cool the argument down?
Because it changes the question. “Will it crash?” is a matter of belief. “At what load does it crash, and which component breaks first?” is an engineering question, and every engineer wants to know the answer.
For Google, you have to know a system’s limits before you can operate it safely. Its SRE book says plainly that engineers use stress tests to find the limits of a web service, and that load tests reveal the breaking point, knowledge that is fundamental to capacity planning.
Seen this way, the architect’s warning is no nuisance. It is a test requirement nobody has written down.
When you say “You’re right, we don’t know where the breaking point is yet. Let us find it together,” he stops being a critic and becomes a co-author. Whatever the result, he agreed from the start to how it would be measured.
Sign the thresholds before you press run
The most damaging mistake is to run the test first and discuss what the results mean afterward. By then each side reads the charts in its own favor. AWS Well-Architected lists this among its anti-patterns: failing to define clear, measurable performance requirements such as response time, throughput and scalability targets.
Grafana k6 has a built-in mechanism for this: thresholds, the pass/fail criteria you declare for each metric. Because they sit in the test file itself, what both sides agreed is kept in version control as well as in the meeting minutes.
The second thing to settle is where the test runs. AWS warns that a scaled-down test environment can mispredict production behavior. If you run on a tiny staging machine and the system holds up, the architect has every reason to reject the result, so let him choose the environment.
A worked example, end to end
Take the review above, with a few hypothetical numbers. After 20 minutes of work, the two sides agree that normal load is 50 concurrent users and that the peak worrying the architect is four times that. To pass at normal load, p95 must be under 800 ms and the error rate under 1%.
The architect adds a question you had not considered: if the system goes down at peak, how far must load fall before it gets back up by itself? Google’s SRE book raises the same question: when some servers crash under heavy load, how far must load drop before the system stabilizes? The script therefore has three phases.
import http from 'k6/http';
import { check } from 'k6';
import { SharedArray } from 'k6/data';
// Real (anonymized) queries supplied by the client, not made up
const queries = new SharedArray('queries', () => JSON.parse(open('./queries.json')));
export const options = {
scenarios: {
baseline: { executor: 'constant-vus', vus: 50, duration: '15m' },
stress: {
executor: 'ramping-vus', startTime: '15m', startVUs: 50,
stages: [{ duration: '10m', target: 200 }, { duration: '5m', target: 200 }],
},
recovery: { executor: 'constant-vus', startTime: '30m', vus: 25, duration: '10m' },
},
thresholds: {
// Thresholds both sides signed: applied only to normal load and the recovery phase
'http_req_duration{scenario:baseline}': ['p(95)<800'],
'http_req_failed{scenario:baseline}': ['rate<0.01'],
'http_req_duration{scenario:recovery}': ['p(95)<800'],
},
};
export default function () {
const q = queries[Math.floor(Math.random() * queries.length)];
const res = http.post(`${__ENV.BASE_URL}/search`, JSON.stringify({ q }),
{ headers: { 'Content-Type': 'application/json' } });
check(res, { 'status 200': (r) => r.status === 200 });
}
The stress phase has no threshold. It runs to find the breaking point, so there is nothing for it to pass. k6 classifies tests by purpose, and a stress test is the kind that shows how a system behaves at its limits, when load exceeds the expected average.
AWS also lists failing to push load beyond expected limits as an anti-pattern.
Say the results come back like this: baseline passes; in the stress phase, p95 shoots up once users exceed about 140; recovery passes. Each side was partly right. The design handles current load but has a ceiling, and now both of you can see where it is.
The recovery phase here tries only one level, 25 users, so it tells you only whether the system recovers at that level. To answer the architect’s question in full, replace it with a ramping-vus scenario that lowers load in several steps, such as 150, 100, 50 and then 25, and note the first step at which p95 returns below 800 ms.
How to run it at your own client
Start early. Ed Glas, writing on a Microsoft blog, points out that many performance problems lie in the architecture and cannot be fixed just before going to production. If the architect is worried, test this week; don’t wait for go-live week.
Load enough data before you measure, because, according to Glas, many performance problems appear only at large data volumes. A database of 10,000 records cannot verify a warning about one that will hold tens of millions.
Test components first and the whole system afterward. Google SRE notes that each component has its own breaking point and so needs its own load test, while Glas suggests going from single transactions to a mix of transactions, and only then to the full system.
In the example above, keep the script but point BASE_URL at an endpoint that runs only the database query. If it breaks sooner than the whole system, you have found the culprit.
Finally, write it down. An ADR (Architectural Decision Record) stores an architecture decision with its rationale, trade-offs and consequences. An ADR along the lines of “keep the synchronous design, measured ceiling about 140 users, add a queue when real load reaches 100” turns the test result into a conditional commitment, so nobody has to restart the argument three months later.
Mistakes that make a joint test backfire
The most common mistake is to write the script yourself and then invite the client to look at the results. A client who had no part in the design will not trust the outcome. Let the architect choose the peak load and the environment, even if you find his number a little pessimistic.
The second is using made-up queries. A list of five repeated queries will be fully cached, and p95 will look suspiciously good. Ask the client for a sample of real, anonymized queries.
The third is treating the stress phase as an exam that must be passed. If you avoid pushing the system to its breaking point, the architect will think you fear the answer. Finding that point is a shared win, and no failure of yours.
The last is forgetting the recovery phase. A system that slows at peak and then heals itself is very different from one that goes down and stays down. Ask the architect directly which case worries him more, and let the answer decide how closely you measure recovery.
Turn it into a line on your résumé
On your résumé, “performed load testing” is too little. Write something like: designed a joint load test with the client’s architecture team, agreed p95 thresholds before the run, identified the database’s breaking point and recorded the decision in an ADR.
For FDE interviews, prepare to tell the story of one such test. It shows that you settle technical disagreements with clients by numbers, whoever is talking loudest.
This week’s exercise: recall the last time you disagreed with someone about performance. Write down three numbers the two of you should have agreed on first, and a three-phase script to check them. The next time someone folds their arms and says “it will crash,” you will have your answer ready: “OK, let us find out where.”
Was this article useful?
Thanks for the feedback!
7 sources
- Testing for Reliability (Google SRE book)
- Addressing Cascading Failures (Google SRE book)
- A pattern for successful load testing: Component Load Testing | Microsoft Learn · 2007-02-17
- REL12-BP03 Test scalability and performance requirements (AWS Well-Architected)
- Thresholds in k6: Pass/Fail Criteria for Tests
- Load test types (Grafana k6 docs)
- Architectural Decision Records (ADRs)