skip to content

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 system

purpose

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

  1. Name the five failure modes that occur only at size.
  2. Compute the load on one target host from the tries at each level.
  3. Explain why a configured cap is not the same as the observed load.
  4. 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 modewhat grows with size
Retry multiplicationThe requests on one host for one item
A shared limit bucketThe number of hosts or workers that use one limit
A race on a reserveThe number of workers that read one balance at the same time
A cap that is not the loadThe gap between the configured cap and the real requests
Rare traffic from volumeThe 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:

  1. Where the mode can occur in the own system.
  2. The test that shows it, at a size near the load at 10 times.
  3. 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 sidedetection 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

optiongaincostwhen it is correct
Retry at each levelEach 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 onlyThe 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 hostThe rate on each host stays at the limit.One store for the buckets of all workersWhen two or more workers can fetch from one host
An atomic reserveNo race on a crawl budgetA write to a shared store for each fetchWhen two or more workers use one crawl budget
Measure the own shareYou know the own volume before a defender counts it.Log queries for each keyWhen the volume of one configuration grows

diagram

retry multiplication at the target host

One request becomes the product of the tries of three levels on one target host.source: My model of retry multiplication at the target

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.

the population view: the own share of each key that a defender can count
keylow volumehigh volumewhat a defender can count
AddressSmall own shareLarge own shareRequests for each address
NetworkSmall own shareLarge own shareRequests for each network
Transport fingerprintSmall own shareLarge own shareRequests for each TLS value
CookieSmall own shareLarge own shareRequests for each cookie
AccountSmall own shareLarge own shareRequests for each account
At high volume, the own requests become a large share of each key that a defender counts.source: My model of the population view

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.

m57-x07-retry-map.tstypescript

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

retry multiplier against the number of retry levels, for 2, 3, and 4 tries at each level24816326439278124372941664256102440961 level2 levels3 levels4 levels5 levels6 levelstimes the load, log1. 2 tries at each level2. 3 tries at each level3. 4 tries at each level

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
retry multiplier against the number of retry levels, for 2, 3, and 4 tries at each level
seriesretry levelstimes the load
2 tries at each level1 level2
2 tries at each level2 levels4
2 tries at each level3 levels8
2 tries at each level4 levels16
2 tries at each level5 levels32
2 tries at each level6 levels64
3 tries at each level1 level3
3 tries at each level2 levels9
3 tries at each level3 levels27
3 tries at each level4 levels81
3 tries at each level5 levels243
3 tries at each level6 levels729
4 tries at each level1 level4
4 tries at each level2 levels16
4 tries at each level3 levels64
4 tries at each level4 levels256
4 tries at each level5 levels1024
4 tries at each level6 levels4096
The curves are computed from a formula: the multiplier is the tries at each level, raised to the number of levels. The tries are example inputs. Log scale.

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

own share of the cluster of each counting key at three volume levelsabcdefghijkllow volume100%87.3%100%100%100%100%medium volume100%96.4%100%100%100%100%87.2%high volume100%100%100%100%100%unit: %a. addressb. address prefixc. networkd. address classe. user-agent buildf. header orderg. header seth. cookiei. screenj. time zonek. devicel. schedule phase

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
own share of the cluster of each counting key at three volume levels
seriescounting key%interval
low volumeaddress10081.57 to 100 (level 0.95)
low volumeaddress prefix80.4366.83 to 89.35 (level 0.95)
low volumenetwork87.380.37 to 92.03 (level 0.95)
low volumeaddress class76.3968.82 to 82.58 (level 0.95)
low volumeuser-agent build10096.63 to 100 (level 0.95)
low volumeheader order10095.52 to 100 (level 0.95)
low volumeheader set10095.52 to 100 (level 0.95)
low volumecookie23.6119.78 to 27.93 (level 0.95)
low volumescreen23.1619.59 to 27.16 (level 0.95)
low volumetime zone23.1619.59 to 27.16 (level 0.95)
low volumedevice10096.63 to 100 (level 0.95)
low volumeschedule phase68.6959 to 76.98 (level 0.95)
medium volumeaddress10089.28 to 100 (level 0.95)
medium volumeaddress prefix95.3690.74 to 97.74 (level 0.95)
medium volumenetwork96.494.24 to 97.77 (level 0.95)
medium volumeaddress class92.6689.91 to 94.7 (level 0.95)
medium volumeuser-agent build10099.11 to 100 (level 0.95)
medium volumeheader order10098.84 to 100 (level 0.95)
medium volumeheader set10098.84 to 100 (level 0.95)
medium volumecookie54.5850.88 to 58.24 (level 0.95)
medium volumescreen54.0350.55 to 57.47 (level 0.95)
medium volumetime zone54.0350.55 to 57.47 (level 0.95)
medium volumedevice10099.11 to 100 (level 0.95)
medium volumeschedule phase87.282.85 to 90.57 (level 0.95)
high volumeaddress10095 to 100 (level 0.95)
high volumeaddress prefix98.1696.53 to 99.03 (level 0.95)
high volumenetwork99.0898.51 to 99.43 (level 0.95)
high volumeaddress class98.0797.32 to 98.62 (level 0.95)
high volumeuser-agent build10099.78 to 100 (level 0.95)
high volumeheader order10099.71 to 100 (level 0.95)
high volumeheader set10099.71 to 100 (level 0.95)
high volumecookie82.8981.11 to 84.54 (level 0.95)
high volumescreen82.5680.88 to 84.13 (level 0.95)
high volumetime zone82.5680.88 to 84.13 (level 0.95)
high volumedevice10099.78 to 100 (level 0.95)
high volumeschedule phase94.4792.81 to 95.77 (level 0.95)
Share of the requests in the cluster of the most common own value of each key that come from the lab fleet. Intervals are Wilson 95% and too narrow. The chart shows the method.

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

problemcausecorrection
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

  1. 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.

  2. 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?

    1. 7
    2. 12
    3. 6
    answer

    b. 12

    The retry multiplier is the product of the tries at each level: 2 x 3 x 2 = 12.

  3. 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.

  4. Two workers read the balance of one crawl budget and then write the reserve in a second step. Which test shows the fault?

    1. A test with one worker and a full crawl budget
    2. A test of the retry multiplier with a failed host
    3. 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.

  5. The own requests become most of the cluster of one key that a defender counts. Which output is correct?

    1. A volume cap, a slower pace, the declared path, or a stop
    2. A higher rate, so that the work ends sooner
    3. 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.
  1. Compute the retry multiplier of the system.
  2. For each of the five failure modes, write where it can occur in the system.
  3. For each mode, write one test.
  4. 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

  1. My model of the five failure modes at size and of the failure-mode review, 2026-11 (not public).
  2. Benchmark platform, design (my test system), 2026-11: the record of a load above the configured daily cap, and its correction (not public).