design by size · lesson 5 of 8 · sources checked 2026-11-30
what works one time and fails at size
This lesson reviews five failure modes that stay hidden at a small size, and gives a test and a correction for each one.
status of this lesson: documented in my test systempurpose
For example, a design that passes a test with ten requests to a target can fail with ten thousand. The fault is not in one part, but in the own load that the parts make together at size. You must find each such fault before the size finds it for you.
objectives
- Name the five failure modes that occur only at size.
- Compute the load on one target host from the tries at each level.
- Explain why a configured cap is not the same as the observed load.
- Write a failure-mode review with a test and a correction or an accepted risk for each mode.
new terms
- reserve race
- A fault where two requests read one balance and both reserve, so the balance goes below zero.
- counting key
- A request property that a defender can use to count requests, for example a network, a transport fingerprint, or a cookie.
- population share
- The share of the requests for one value of a counting key that come from the own fleet.
- population view
- A count of the own traffic for each key that a defender can count, compared with a normal population.
how it works
Five failure modes stay hidden at a small size. Each mode works one time and fails when the volume grows:
| failure mode | what grows with size |
|---|---|
| Retry multiplication | The requests on one host for one item |
| A shared limit bucket | The number of hosts or workers that use one limit |
| A race on a reserve | The number of workers that read one balance at the same time |
| A cap that is not the load | The gap between the configured cap and the real requests |
| Rare traffic from volume | The share of the own requests in each count of a defender |
retry multiplication
Each level that retries multiplies the requests that the level below it gets. The retry multiplier is the product of the tries at each level. For example, a worker, a browser, and a gateway each try 3 times. When the target fails each request, one item gives 3 x 3 x 3 = 27 requests on one host.
At a small size, nobody sees the 27 requests. At size, one slow host gets this product for each item in the queue. The first chart in the section "Data" shows how fast the product grows with each level. The retry budget that limits it is in Retry budgets and the retry multiplier.
a shared limit bucket
A token bucket limits the rate of one key. The fault is a wrong key. For example, one bucket for all hosts lets one busy host take the full rate.
One bucket for each worker is also wrong. Each worker then gets the full rate on the same host. Thus ten workers give ten times the rate on that host.
The correct key is the host, with one bucket for each host for all workers.
a race on a reserve
A reserve race occurs when two workers read one balance and both reserve. For example, a host has a daily crawl budget of 100 fetches, and 99 are used. Two workers read 99 at the same time, and both fetch. The host gets 101 fetches.
With one worker, the race never occurs. Thus a test with one worker does not show it.
The correction is an atomic reserve: the read and the write occur in one step.
a cap that is not the load
The benchmark platform, my test system, records this failure class. The observed load on a target was higher than the configured daily cap for each site. The documented correction is one limiter for each host, and a check of the observed load against the cap.
A cap is a configured value. The load is what the target gets. Thus a review compares the two from the request log, not from the settings.
rare traffic from volume
A defender counts requests on a counting key, for example a network or a set of headers. At low volume, the own requests are a small part of each count. At high volume, they become most of the cluster of one key.
The population share is that part. The second chart in the section "Data" shows the method in a lab.
The own share is a sign of the own volume. It is not a value to defeat. The outputs that follow from it are a volume cap, a slower pace, the declared path, or a stop. A change of the address does not split a count on another key. The share report is in The population view: the own fleet as a defender counts it (not yet published).
the failure-mode review
For each of the five modes, the review writes three items:
- Where the mode can occur in the own system.
- The test that shows it, at a size near the load at 10 times.
- The correction, or the accepted risk with its trigger. The register of accepted risks is in The accepted-risk register (not yet published).
For example, the row for the race on a reserve names the table of crawl budgets. Its test uses two workers on one balance, and its correction is the atomic reserve.
the two sides
| automation side | detection side |
|---|---|
| Each level that retries multiplies the load on one target. Volume makes one configuration a large share of the requests for each key that a defender counts. A change of the address does not split a count on another key. | A defender sees retry multiplication as bursts of the same request from one key. A defender counts on keys other than the address, keeps a baseline for each site, and links shared values. When the operator lowers its volume after a measurement, the defender sees the volume for one key rise and then fall. |
design decisions
| option | gain | cost | when it is correct |
|---|---|---|---|
| Retry at each level | Each level recovers from its own faults. | The tries multiply on one host. | Only with a retry budget that covers all levels |
| Retry at one level only | The load on one host stays near the count of items. | A fault of a lower level goes up to that level. | When the levels share one request path |
| One limit bucket for each host | The rate on each host stays at the limit. | One store for the buckets of all workers | When two or more workers can fetch from one host |
| An atomic reserve | No race on a crawl budget | A write to a shared store for each fetch | When two or more workers use one crawl budget |
| Measure the own share | You know the own volume before a defender counts it. | Log queries for each key | When the volume of one configuration grows |
diagram
retry multiplication at the target host
A matrix of five keys that a defender can count against low volume and high volume. At low volume, the own share of each key is small. At high volume, it is large for each key.
| key | low volume | high volume | what a defender can count |
|---|---|---|---|
| Address | Small own share | Large own share | Requests for each address |
| Network | Small own share | Large own share | Requests for each network |
| Transport fingerprint | Small own share | Large own share | Requests for each TLS value |
| Cookie | Small own share | Large own share | Requests for each cookie |
| Account | Small own share | Large own share | Requests for each account |
The first diagram shows the product of the tries. The second diagram shows the population view for five keys.
code example
The example keeps a synthetic retry map in the code and computes the requests on one host for one item. It also gives the worst-case requests on one host for an example count of items each day.
Compute the retry multiplier from a synthetic retry map, and the worst-case requests on one host for an example count of items.
// A synthetic retry map: the tries of each level on one request path.
// The retry multiplier is the product of the tries of all levels.
type Level = { name: string; tries: number };
const levels: Level[] = [
{ name: "worker", tries: 3 },
{ name: "browser", tries: 3 },
{ name: "gateway", tries: 3 },
];
const itemsEachDayExample = 2000; // an example count, not a real volume
const multiplier = levels.reduce((product, level) => product * level.tries, 1);
for (const level of levels) {
console.log(`level ${level.name}: ${level.tries} tries`);
}
console.log(`retry multiplier: ${multiplier}`);
console.log(
`worst case on one host: ${itemsEachDayExample * multiplier} requests each day ` +
`for ${itemsEachDayExample} items (example count)`,
);output
The tries of each level, the retry multiplier, and the worst case on one host for the example count.
level worker: 3 tries
level browser: 3 tries
level gateway: 3 tries
retry multiplier: 27
worst case on one host: 54000 requests each day for 2000 items (example count)The output shows that three levels with 3 tries each give 27 requests on one host for one item.
data
retry multiplier against the number of retry levels, for 2, 3, and 4 tries at each level
status of this figure: example
source: My model of retries: the product of the tries of each level, example inputs; date 2026-11-12; condition: Every level retries every failure and the target fails every request. A real stack has a budget and a smaller multiplier. A computed curve, not a measurement.
data table
| series | retry levels | times the load |
|---|---|---|
| 2 tries at each level | 1 level | 2 |
| 2 tries at each level | 2 levels | 4 |
| 2 tries at each level | 3 levels | 8 |
| 2 tries at each level | 4 levels | 16 |
| 2 tries at each level | 5 levels | 32 |
| 2 tries at each level | 6 levels | 64 |
| 3 tries at each level | 1 level | 3 |
| 3 tries at each level | 2 levels | 9 |
| 3 tries at each level | 3 levels | 27 |
| 3 tries at each level | 4 levels | 81 |
| 3 tries at each level | 5 levels | 243 |
| 3 tries at each level | 6 levels | 729 |
| 4 tries at each level | 1 level | 4 |
| 4 tries at each level | 2 levels | 16 |
| 4 tries at each level | 3 levels | 64 |
| 4 tries at each level | 4 levels | 256 |
| 4 tries at each level | 5 levels | 1024 |
| 4 tries at each level | 6 levels | 4096 |
The first chart shows that each new level multiplies the load again.
own share of the cluster of each counting key at three volume levels
status of this figure: measured by me
lines: interval, level 0.95
source: Lab result of this course: own share of each counting key in a scripted lab population; date 2026-11-13; sample of 3,362; condition: Scripted lab fleet pooled with 365 scripted background requests. The lab site has no accounts. Requests of one session are not independent, so the intervals are too narrow.
data table
| series | counting key | % | interval |
|---|---|---|---|
| low volume | address | 100 | 81.57 to 100 (level 0.95) |
| low volume | address prefix | 80.43 | 66.83 to 89.35 (level 0.95) |
| low volume | network | 87.3 | 80.37 to 92.03 (level 0.95) |
| low volume | address class | 76.39 | 68.82 to 82.58 (level 0.95) |
| low volume | user-agent build | 100 | 96.63 to 100 (level 0.95) |
| low volume | header order | 100 | 95.52 to 100 (level 0.95) |
| low volume | header set | 100 | 95.52 to 100 (level 0.95) |
| low volume | cookie | 23.61 | 19.78 to 27.93 (level 0.95) |
| low volume | screen | 23.16 | 19.59 to 27.16 (level 0.95) |
| low volume | time zone | 23.16 | 19.59 to 27.16 (level 0.95) |
| low volume | device | 100 | 96.63 to 100 (level 0.95) |
| low volume | schedule phase | 68.69 | 59 to 76.98 (level 0.95) |
| medium volume | address | 100 | 89.28 to 100 (level 0.95) |
| medium volume | address prefix | 95.36 | 90.74 to 97.74 (level 0.95) |
| medium volume | network | 96.4 | 94.24 to 97.77 (level 0.95) |
| medium volume | address class | 92.66 | 89.91 to 94.7 (level 0.95) |
| medium volume | user-agent build | 100 | 99.11 to 100 (level 0.95) |
| medium volume | header order | 100 | 98.84 to 100 (level 0.95) |
| medium volume | header set | 100 | 98.84 to 100 (level 0.95) |
| medium volume | cookie | 54.58 | 50.88 to 58.24 (level 0.95) |
| medium volume | screen | 54.03 | 50.55 to 57.47 (level 0.95) |
| medium volume | time zone | 54.03 | 50.55 to 57.47 (level 0.95) |
| medium volume | device | 100 | 99.11 to 100 (level 0.95) |
| medium volume | schedule phase | 87.2 | 82.85 to 90.57 (level 0.95) |
| high volume | address | 100 | 95 to 100 (level 0.95) |
| high volume | address prefix | 98.16 | 96.53 to 99.03 (level 0.95) |
| high volume | network | 99.08 | 98.51 to 99.43 (level 0.95) |
| high volume | address class | 98.07 | 97.32 to 98.62 (level 0.95) |
| high volume | user-agent build | 100 | 99.78 to 100 (level 0.95) |
| high volume | header order | 100 | 99.71 to 100 (level 0.95) |
| high volume | header set | 100 | 99.71 to 100 (level 0.95) |
| high volume | cookie | 82.89 | 81.11 to 84.54 (level 0.95) |
| high volume | screen | 82.56 | 80.88 to 84.13 (level 0.95) |
| high volume | time zone | 82.56 | 80.88 to 84.13 (level 0.95) |
| high volume | device | 100 | 99.78 to 100 (level 0.95) |
| high volume | schedule phase | 94.47 | 92.81 to 95.77 (level 0.95) |
The second chart shows how the own share of each key changes with the volume in a scripted lab population. It shows a method of measurement, not a property of a real fleet.
failure modes
| problem | cause | correction |
|---|---|---|
| A slow host gets many times the requests of its items. | Each level retries, and the tries multiply. | Compute the retry multiplier, and use one retry budget for all levels. |
| One busy host takes the full rate, and other hosts wait. | One limit bucket serves all hosts. | Use one bucket for each host. |
| A host gets more fetches than its crawl budget. | Two workers read one balance and both reserve. | Make the read and the write of the reserve one atomic step. |
| The observed load is higher than the configured cap. | The cap is a configured value, and no check reads the real requests. | Use one limiter for each host, and compare the request log with the cap. |
| The own requests become most of a count of a defender. | The volume of one configuration grows. | Measure the own share. Then set a volume cap, a slower pace, the declared path, or a stop. |
check questions
Name the five failure modes that occur only at size.
sample answer
Retry multiplication, a shared limit bucket, a race on a reserve, a cap that is not the load, and rare traffic from volume.
A worker tries 2 times, a browser tries 3 times, and a gateway tries 2 times. The target fails each request. How many requests does one item give on one host?
- 7
- 12
- 6
answer
b. 12
The retry multiplier is the product of the tries at each level: 2 x 3 x 2 = 12.
Explain why a configured daily cap for each site does not show the load that the site gets.
sample answer
A cap is a configured value. The load is what the target gets. Retries and more workers can send more requests than the cap. Thus you compare the request log with the cap, and you use one limiter for each host.
Two workers read the balance of one crawl budget and then write the reserve in a second step. Which test shows the fault?
- A test with one worker and a full crawl budget
- A test of the retry multiplier with a failed host
- A test with two workers on one balance near its end
answer
c. A test with two workers on one balance near its end
The race on a reserve occurs only when two workers read one balance at the same time. A test with one worker never shows it.
The own requests become most of the cluster of one key that a defender counts. Which output is correct?
- A volume cap, a slower pace, the declared path, or a stop
- A higher rate, so that the work ends sooner
- No change, because the share is a lab value
answer
a. A volume cap, a slower pace, the declared path, or a stop
The own share is a sign of the own volume, not a value to defeat. The outputs are a volume cap, a slower pace, the declared path, or a stop.
exercise
exercise Do this task on paper. Use the synthetic system below. Do not send a request to a site.
The synthetic system:
- A worker tries 2 times, a browser tries 2 times, and a gateway tries 3 times.
- Each of four workers has its own limit bucket, with a rate of 1 request each second.
- One table holds a daily crawl budget for each host. Each worker reads the balance and then writes the reserve in a second step.
- The settings have a daily cap of 500 requests for each site. Nobody compares the request log with the cap.
- Compute the retry multiplier of the system.
- For each of the five failure modes, write where it can occur in the system.
- For each mode, write one test.
- For each mode, write the correction or the accepted risk.
sample answer
The answer uses the synthetic system of the task.
The retry multiplier is 2 x 2 x 3 = 12 requests on one host for one item.
Retry multiplication occurs in the three levels. The test fails each request of a lab host and counts the requests for one item. The correction is one retry budget for all levels.
The limit bucket has the wrong key. Four workers can give 4 requests each second on one host. The test runs four workers on one lab host. The correction is one bucket for each host.
The table of crawl budgets has a race on a reserve. The test runs two workers on one balance near its end. The correction is an atomic reserve.
The daily cap is not the load. The test compares the request log of one lab host with the cap. The correction is one limiter for each host and a check against the log.
Rare traffic from volume can occur when the volume grows. The test measures the own share of each key in the own lab. The output is a volume cap, a slower pace, the declared path, or a stop.
sources
- My model of the five failure modes at size and of the failure-mode review, 2026-11 (not public).
- Benchmark platform, design (my test system), 2026-11: the record of a load above the configured daily cap, and its correction (not public).