economics · lesson 6 of 9 · sources checked 2026-11-20
fixed costs, guards, and build or buy
This lesson shows costs that run with no attempt, three spend limits that stop spend before it occurs, and a rule for build or buy.
status of this lesson: documented in my test systempurpose
Some costs grow with each attempt, and other costs run also when no attempt runs. The design of a sweep sets its candidate count, and each new axis multiplies the cost.
objectives
- Calculate the candidate count of a sweep for each of the two sweep designs.
- Explain how the duty cycle of a paid resource changes the cost of a job.
- Describe the three spend limits, and the reason to refuse a job and not to truncate it.
- Make a build-or-buy decision for one stack component and state its assumptions.
new terms
- duty cycle
- The share of time that a paid resource runs.
- spot capacity
- Cloud capacity at a lower price that the provider can take back with a short notice.
- stack
- The five components that an operator combines to get a page from a protected site: proxy, browser, fingerprint, behavior, and solver.
- one factor at a time
- A sweep design that changes one stack component and keeps the others at a base value.
- full factorial
- A sweep design that runs every combination of the swept components.
- budget gate
- A check that defers work when the planned spend is over the limit for the period.
- build or buy
- The decision to make a component in-house or to pay a vendor for it.
- browser build
- A browser binary that a tool ships or patches.
- lever
- One variable that an operator can change to move a result, for example the engine or the exit.
- CAPTCHA
- A challenge that a human can pass and a program cannot pass easily.
- detection vendor
- A company that sells a product that classifies visitors as human or automated.
how it works
The cost of an automation job has two parts. Run spend grows with each attempt. A fixed cost runs also when no attempt runs.
fixed costs
A paid resource costs money for each hour that it runs, also when it does no work. Its duty cycle is the share of time that it runs. Four fixed costs occur frequently:
- Idle infrastructure: a host or a database that runs all day for a short job.
- A GPU node: each hour costs much, and each start takes time before the node does work.
- spot capacity: it costs less, but the provider can take it back. It can also be unavailable when a job must start.
- Outbound traffic through the NAT service of a cloud: the cloud can bill each GB of it, in addition to the bytes of the proxy.
example A GPU node does 1 hour of work each day. If it runs all day, its duty cycle is 100%, and 23 of its 24 paid hours do no work. If it starts for one daily window of 1 hour, its duty cycle is approximately 4%.
The benchmark platform, my test system, uses two rules for fixed costs. It runs its GPU work in one daily window, because hourly launches cost much and did little work. It also buys the baseline capacity that must exist.
the cost of a sweep
A sweep tries candidates on one or more axes of the stack, for example the proxy and the browser. The sweep design sets the candidate count, and thus the cost.
There are two sweep designs:
- one factor at a time: the count is one base candidate, plus each other value of each axis.
- full factorial: the count is the product of the sizes of the axes.
example Two axes with 25 candidates each give 49 candidates for one factor at a time. The same axes give 625 candidates for full factorial.
Full factorial finds an effect of two axes together, and one factor at a time cannot find it. But its count grows as a product. Each new axis multiplies the cost.
The benchmark platform shows the candidate count before a sweep starts, and it refuses a sweep above its attempt ceiling. It runs its full sweep weekly, not daily, to limit the cost.
three spend limits and one rule
A spend limit is a cost guard: it stops spend before it occurs. There are three spend limits and one rule:
- A daily budget. A budget gate defers a job when the planned spend is over the limit of the day.
- A cap for each site. It limits the attempts or the spend for one target in one period.
- An attempt ceiling. It limits the attempts of one sweep or one job.
- The rule: refuse, not truncate. A job above a limit does not run, and the refusal gives its numbers.
A truncated sweep is worse than no sweep. It runs only the first candidates, but its result looks complete.
example A sweep plans 1,875 attempts, and the ceiling is 500 attempts. The attempt ceiling refuses the sweep and prints the two numbers. It does not run the first 500 attempts.
The lesson Build cost guards and budget gates builds the guard chain, a set of four guards, in a lab.
build or buy
Each part that an operator can buy has a price model, for example a price for each GB or for each success. The second diagram gives one price model for each part. A build or buy decision compares the cost of each model with the result that it gives.
My model gives two rules:
- Buy a component when it takes years of research. An example is a browser build with a coherent fingerprint.
- Build a lever when it has no cost for each request. Examples are a filter that stops heavy resources, and a slower pace.
A lever can also leave a signal. For example, a site can see a visitor that never loads an image or a font.
A component that costs more for each request and gives no better success rate is a loss. Thus compare two components on cost and on result.
claim of a company Browserless states that an open browser session uses one unit for each 30 seconds, also when the browser is idle Browserless, source 1. It also states that it bills CAPTCHA solving only for a successful result.
Sometimes the best option is no collection from the site. A public data source can give the same data.
claim of a company Common Crawl publishes a corpus of raw page data, metadata, and the text of the pages Common Crawl, source 2. It states that it collected this data regularly since 2008.
claim of a company The MediaWiki API etiquette page asks clients to send requests in series, not in parallel MediaWiki (Wikimedia Foundation), source 3. It also states that the Wikimedia sites have faster routes for data in bulk than the Action API.
the two sides
| automation side | detection side |
|---|---|
| The operator buys a component when it takes years of research, for example a coherent browser build. The operator builds a lever when the lever has no cost for each request. | A detection vendor puts a price on the protected traffic. Its cost does not grow when one client is more difficult to classify. |
design decisions
| option | gain | cost | when it is correct |
|---|---|---|---|
| Run a GPU node only in one daily window | Few paid hours do no work. | The results come one time each day. | Work that can wait until the next window |
| Buy the baseline capacity, and use spot capacity for extra work | The work that must run can start. | The baseline costs more for each hour. | When a delay of the baseline work stops the service |
| One factor at a time | The count grows as a sum of the axes. | It cannot find an effect of two axes together. | A first sweep, or a sweep with many axes |
| Full factorial | It finds an effect of two axes together. | The count grows as a product of the axes. | Few axes with few candidates, under the attempt ceiling |
| Buy a component | No years of research before the first result. | Each request or success has a price. | A coherent browser build, or a network of exit addresses |
| Use a public data source | No collection from the site. | The data can be older, and the source sets its own terms. | When a corpus or an API holds the data that you must have |
diagram
A matrix of five browsers by five proxies. The base cell, the first row, and the first column are in both sweep designs. The other 16 cells are in full factorial only. One factor at a time has 9 candidates, and full factorial has 25.
| browser by proxy | proxy 1 | proxy 2 | proxy 3 | proxy 4 | proxy 5 |
|---|---|---|---|---|---|
| browser 1 | base: both designs | both designs | both designs | both designs | both designs |
| browser 2 | both designs | full factorial only | full factorial only | full factorial only | full factorial only |
| browser 3 | both designs | full factorial only | full factorial only | full factorial only | full factorial only |
| browser 4 | both designs | full factorial only | full factorial only | full factorial only | full factorial only |
| browser 5 | both designs | full factorial only | full factorial only | full factorial only | full factorial only |
A matrix of seven parts that an operator can buy, with their price model, the quantity that the cost grows with, and the build option. A metered proxy has a price for each GB, and a browser service has a price for each browser hour. An anti-detect browser has a price for each profile, and its build option takes years of research.
| part | price model | cost grows with | build option |
|---|---|---|---|
| metered proxy | per GB | page weight and retries | none: a network must exist |
| ISP proxy | per IP address | pool size, not traffic | none: a network must exist |
| unlocker | per success | successful pages | own stack of all components |
| anti-detect browser | per profile | count of profiles | own browser build: years of research |
| solver service | per 1,000 solves | challenge rate | no build option |
| browser infrastructure | per browser hour | open browser time, also idle | own hosts with a duty cycle |
| language model | per token | page text sent to the model | rules or a small local model |
code example
The first example gives the candidate count and the attempt count of the two sweep designs. It refuses a sweep above the attempt ceiling, and it gives its numbers.
example All counts are synthetic.
Calculate the candidates and the attempts of one factor at a time and of full factorial. Refuse a sweep above the attempt ceiling, with its numbers.
// Sweep cost before the run. All counts are synthetic.
// Argument 1: the attempt ceiling. Argument 2: the attempts for each candidate.
// Each next argument: the candidate count of one axis.
type Plan = { design: string; candidates: number; attempts: number };
function oneFactorAtATime(axes: number[]): number {
// One base candidate, then each other value of each axis one time.
return 1 + axes.reduce((sum, n) => sum + (n - 1), 0);
}
function fullFactorial(axes: number[]): number {
// Each combination of the values of all axes.
return axes.reduce((product, n) => product * n, 1);
}
function decide(p: Plan, ceiling: number): string {
const head = `${p.design}: ${p.candidates} candidates, ${p.attempts} attempts`;
if (p.attempts > ceiling) {
// Refuse the full sweep. Do not run only the first part of it.
return `${head}: refused, ${p.attempts} > ceiling ${ceiling}, no attempt runs`;
}
return `${head}: accepted`;
}
const [ceiling, perCandidate, ...axes] = process.argv.slice(2).map(Number);
const plans: Plan[] = [
{ design: "one factor at a time", candidates: oneFactorAtATime(axes), attempts: 0 },
{ design: "full factorial", candidates: fullFactorial(axes), attempts: 0 },
];
for (const p of plans) {
p.attempts = p.candidates * perCandidate;
console.log(decide(p, ceiling));
}output
One line for each sweep design: the candidates, the attempts, and accepted or refused.
one factor at a time: 49 candidates, 147 attempts: accepted
full factorial: 625 candidates, 1875 attempts: refused, 1875 > ceiling 500, no attempt runsI ran the code with the Node runtime and the flag --experimental-strip-types. The arguments were a ceiling of 500 attempts, 3 attempts for each candidate, and two axes with 25 candidates each.
The second example keeps a ledger of the spend of one day. It defers a job when the planned spend goes over the daily budget.
example All values are synthetic, in an invented cost unit u.
Keep a daily spend ledger, and accept or defer each queued job against the daily budget.
import { readFileSync } from "node:fs";
// A daily spend ledger and the defer decision. All values are synthetic,
// in the invented cost unit u.
type Entry = { job: string; cost: number };
type Job = { job: string; planned: number };
type Day = { budget: number; ledger: Entry[]; queue: Job[] };
function spent(ledger: Entry[]): number {
return ledger.reduce((sum, e) => sum + e.cost, 0);
}
function run(day: Day): string[] {
const lines: string[] = [];
for (const j of day.queue) {
const before = spent(day.ledger);
if (before + j.planned > day.budget) {
// Defer the full job to the next day. Do not start a part of it.
lines.push(`${j.job}: deferred, ${before} + ${j.planned} > budget ${day.budget}`);
continue;
}
// A real job writes its real cost here after it ends.
day.ledger.push({ job: j.job, cost: j.planned });
lines.push(`${j.job}: accepted, spend now ${before + j.planned} of ${day.budget}`);
}
return lines;
}
// The argument is a JSON file: { budget, ledger: [{ job, cost }], queue: [{ job, planned }] }.
const day: Day = JSON.parse(readFileSync(process.argv[2], "utf8"));
for (const line of run(day)) console.log(line);output
One line for each queued job: accepted with the new spend, or deferred with its numbers.
j2: accepted, spend now 75 of 100
j3: deferred, 75 + 30 > budget 100
j4: accepted, spend now 95 of 100I ran the code in the same way, on one synthetic day:
- The budget is 100 u, and the ledger holds job j1 with a cost of 40 u.
- The queue holds job j2 at 35 u, job j3 at 30 u, and job j4 at 20 u.
Job j3 waits for the next day, but the smaller job j4 can run.
data
candidate count against candidates for each axis, for two swept axes
status of this figure: example
source: Benchmark platform, code (my test system): candidate formulas for a sweep of two axes; date 2026-11-16
data table
| series | tools for each axis | candidates |
|---|---|---|
| one factor at a time | 2 candidates | 3 |
| one factor at a time | 3 candidates | 5 |
| one factor at a time | 4 candidates | 7 |
| one factor at a time | 5 candidates | 9 |
| one factor at a time | 6 candidates | 11 |
| one factor at a time | 7 candidates | 13 |
| one factor at a time | 8 candidates | 15 |
| one factor at a time | 9 candidates | 17 |
| one factor at a time | 10 candidates | 19 |
| one factor at a time | 11 candidates | 21 |
| one factor at a time | 12 candidates | 23 |
| one factor at a time | 13 candidates | 25 |
| one factor at a time | 14 candidates | 27 |
| one factor at a time | 15 candidates | 29 |
| one factor at a time | 16 candidates | 31 |
| one factor at a time | 17 candidates | 33 |
| one factor at a time | 18 candidates | 35 |
| one factor at a time | 19 candidates | 37 |
| one factor at a time | 20 candidates | 39 |
| one factor at a time | 21 candidates | 41 |
| one factor at a time | 22 candidates | 43 |
| one factor at a time | 23 candidates | 45 |
| one factor at a time | 24 candidates | 47 |
| one factor at a time | 25 candidates | 49 |
| full factorial | 2 candidates | 4 |
| full factorial | 3 candidates | 9 |
| full factorial | 4 candidates | 16 |
| full factorial | 5 candidates | 25 |
| full factorial | 6 candidates | 36 |
| full factorial | 7 candidates | 49 |
| full factorial | 8 candidates | 64 |
| full factorial | 9 candidates | 81 |
| full factorial | 10 candidates | 100 |
| full factorial | 11 candidates | 121 |
| full factorial | 12 candidates | 144 |
| full factorial | 13 candidates | 169 |
| full factorial | 14 candidates | 196 |
| full factorial | 15 candidates | 225 |
| full factorial | 16 candidates | 256 |
| full factorial | 17 candidates | 289 |
| full factorial | 18 candidates | 324 |
| full factorial | 19 candidates | 361 |
| full factorial | 20 candidates | 400 |
| full factorial | 21 candidates | 441 |
| full factorial | 22 candidates | 484 |
| full factorial | 23 candidates | 529 |
| full factorial | 24 candidates | 576 |
| full factorial | 25 candidates | 625 |
The first chart shows the candidate count of the two sweep designs for two axes. The gap between the two lines grows with each new candidate on an axis.
gpu cost by schedule, as a multiple of one daily window
status of this figure: estimate, not measured
source: Benchmark platform, code (my test system): GPU schedules, monthly cost as a ratio to one daily window; date 2026-11-16
data table
| item | times daily cost |
|---|---|
| one daily window | 1 |
| failed hourly launches | 6.8 |
| hourly launches | 23.9 |
| node with the largest duty cycle | 48.6 |
The second chart compares the GPU schedules of the benchmark platform with its one daily window. The node with the largest duty cycle costs the most.
failure modes
| problem | cause | correction |
|---|---|---|
| A GPU node costs much and does little work. | It starts each hour, and each start takes paid time before work. | Run the work in one daily window. |
| A job that must run does not start. | The job uses only spot capacity, and the provider took it back. | Buy the baseline capacity that must exist. Use spot capacity only for work that can wait. |
| One sweep costs many times more than the plan. | The default design is full factorial, and each axis multiplies the count. | Show the candidate count before the run. Refuse a sweep above the attempt ceiling. |
| A sweep result looks complete, but it is not. | A spend limit truncated the sweep and ran only the first candidates. | Refuse the full sweep, and give its numbers. |
| The cost of a browser service is higher than the work. | The service bills the time of each open browser session, also when the browser is idle. | Close each browser session when its work ends. |
| A bought component costs more and gives no better success rate. | The decision compared only the cost, not the result. | Compare each component on cost and on result. |
check questions
A sweep has three axes with 4 candidates each. How many candidates does one factor at a time give, and how many does full factorial give?
- 12 and 64
- 10 and 64
- 10 and 12
- 64 and 10
answer
b. 10 and 64
One factor at a time gives one base candidate plus 3 other values on each of the three axes: 1 + 9 = 10. Full factorial gives the product: 4 x 4 x 4 = 64.
Explain why a GPU node that runs all day for 1 hour of work costs more than the work.
sample answer
The node costs money for each hour that it runs, also when it does no work. Its duty cycle is 100%, but only 1 of its 24 paid hours does work. If it starts for one daily window, the duty cycle comes near the work time.
Describe the three spend limits, and say why a limit refuses a sweep above it and does not truncate it.
sample answer
A daily budget defers a job when the planned spend is over the limit of the day. A cap for each site limits the attempts or the spend for one target. An attempt ceiling limits one sweep or one job. By the rule refuse, not truncate, a job above a limit does not run, and the refusal gives its numbers. A truncated sweep runs only the first candidates, but its result looks complete.
With the build-or-buy rule, which component do you buy?
- A filter that stops heavy resources
- A slower pace of requests
- A browser build with a coherent fingerprint
- A daily budget for the spend
answer
c. A browser build with a coherent fingerprint
Buy a component when it takes years of research, for example a browser build with a coherent fingerprint. A lever with no cost for each request, for example a filter or a slower pace, is a part to build.
exercise
exercise Do this task in your own lab, with synthetic counts only. Do not send a request to a site.
- Save the first code example in an empty folder of your lab.
- Run it with Node, the flag
--experimental-strip-types, and the arguments300 2 5 5 5 5. - Record the candidates, the attempts, and the decision for each sweep design.
- Run it again with the arguments
300 2 5 5. - Write which design you select for each case, and the reason.
sample answer
The answer uses the synthetic counts only.
With four axes of 5 candidates, one factor at a time has 17 candidates and 34 attempts, and the code accepts it. Full factorial has 625 candidates and 1250 attempts, and the code refuses it.
With two axes of 5 candidates, one factor at a time has 9 candidates and 18 attempts. Full factorial has 25 candidates and 50 attempts. The code accepts both.
For four axes, select one factor at a time, because full factorial is above the ceiling. For two axes, full factorial is correct, because it is under the ceiling and it can find an effect of two axes together.
sources
- Browserless unit consumption, Browserless, documentation, read 2026-11-20
- Overview, Common Crawl, documentation, read 2026-11-20
- API:Etiquette, MediaWiki (Wikimedia Foundation), documentation, read 2026-11-20
- My model of fixed costs, the cost of a sweep, spend limits, and build or buy, 2026-11 (not public).
- Benchmark platform, design (my test system): the daily GPU window, the bought baseline capacity, the weekly sweep, and the attempt ceiling of a sweep, 2026-11 (not public).