skip to content

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 system

purpose

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

  1. Calculate the candidate count of a sweep for each of the two sweep designs.
  2. Explain how the duty cycle of a paid resource changes the cost of a job.
  3. Describe the three spend limits, and the reason to refuse a job and not to truncate it.
  4. 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:

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:

  1. A daily budget. A budget gate defers a job when the planned spend is over the limit of the day.
  2. A cap for each site. It limits the attempts or the spend for one target in one period.
  3. An attempt ceiling. It limits the attempts of one sweep or one job.
  4. 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 sidedetection 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

optiongaincostwhen it is correct
Run a GPU node only in one daily windowFew 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 workThe 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 timeThe 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 factorialIt 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 componentNo 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 sourceNo 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.

two sweep designs on two axes with five candidates each
browser by proxyproxy 1proxy 2proxy 3proxy 4proxy 5
browser 1base: both designsboth designsboth designsboth designsboth designs
browser 2both designsfull factorial onlyfull factorial onlyfull factorial onlyfull factorial only
browser 3both designsfull factorial onlyfull factorial onlyfull factorial onlyfull factorial only
browser 4both designsfull factorial onlyfull factorial onlyfull factorial onlyfull factorial only
browser 5both designsfull factorial onlyfull factorial onlyfull factorial onlyfull factorial only
Each new axis multiplies the candidate count of full factorial.source: My model of the cost of a sweep

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.

price models of the parts that an operator can buy
partprice modelcost grows withbuild option
metered proxyper GBpage weight and retriesnone: a network must exist
ISP proxyper IP addresspool size, not trafficnone: a network must exist
unlockerper successsuccessful pagesown stack of all components
anti-detect browserper profilecount of profilesown browser build: years of research
solver serviceper 1,000 solveschallenge rateno build option
browser infrastructureper browser houropen browser time, also idleown hosts with a duty cycle
language modelper tokenpage text sent to the modelrules or a small local model
Some price models grow with traffic, and others grow with time or with profiles.source: My model of the price models of the parts that an operator can buy

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.

m02-x06-sweep.tstypescript

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 runs

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

m02-x07-ledger.tstypescript

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 100

I 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

candidate count against candidates for each axis, for two swept axes3494625abcdefghijklmnopqrstuvwxcandidates1. one factor at a time2. full factoriala. 2 candidatesb. 3 candidatesc. 4 candidatesd. 5 candidatese. 6 candidatesf. 7 candidatesg. 8 candidatesh. 9 candidatesi. 10 candidatesj. 11 candidatesk. 12 candidatesl. 13 candidatesm. 14 candidatesn. 15 candidateso. 16 candidatesp. 17 candidatesq. 18 candidatesr. 19 candidatess. 20 candidatest. 21 candidatesu. 22 candidatesv. 23 candidatesw. 24 candidatesx. 25 candidates

source: Benchmark platform, code (my test system): candidate formulas for a sweep of two axes; date 2026-11-16

data table
candidate count against candidates for each axis, for two swept axes
seriestools for each axiscandidates
one factor at a time2 candidates3
one factor at a time3 candidates5
one factor at a time4 candidates7
one factor at a time5 candidates9
one factor at a time6 candidates11
one factor at a time7 candidates13
one factor at a time8 candidates15
one factor at a time9 candidates17
one factor at a time10 candidates19
one factor at a time11 candidates21
one factor at a time12 candidates23
one factor at a time13 candidates25
one factor at a time14 candidates27
one factor at a time15 candidates29
one factor at a time16 candidates31
one factor at a time17 candidates33
one factor at a time18 candidates35
one factor at a time19 candidates37
one factor at a time20 candidates39
one factor at a time21 candidates41
one factor at a time22 candidates43
one factor at a time23 candidates45
one factor at a time24 candidates47
one factor at a time25 candidates49
full factorial2 candidates4
full factorial3 candidates9
full factorial4 candidates16
full factorial5 candidates25
full factorial6 candidates36
full factorial7 candidates49
full factorial8 candidates64
full factorial9 candidates81
full factorial10 candidates100
full factorial11 candidates121
full factorial12 candidates144
full factorial13 candidates169
full factorial14 candidates196
full factorial15 candidates225
full factorial16 candidates256
full factorial17 candidates289
full factorial18 candidates324
full factorial19 candidates361
full factorial20 candidates400
full factorial21 candidates441
full factorial22 candidates484
full factorial23 candidates529
full factorial24 candidates576
full factorial25 candidates625
The values are computed from the candidate formulas of the two sweep designs. One factor at a time grows in a line. Full factorial grows as a product: 25 candidates on each axis give 49 against 625 candidates.

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

gpu cost by schedule, as a multiple of one daily windowone daily window1failed hourly launches6.8hourly launches23.9node with the largest dutycycle48.6unit: times daily cost

source: Benchmark platform, code (my test system): GPU schedules, monthly cost as a ratio to one daily window; date 2026-11-16

data table
gpu cost by schedule, as a multiple of one daily window
itemtimes daily cost
one daily window1
failed hourly launches6.8
hourly launches23.9
node with the largest duty cycle48.6
Each value is the monthly cost of a schedule divided by the monthly cost of one daily window. Hourly launches cost about 24 times one window, and they delivered nothing. The costs are estimates.

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

problemcausecorrection
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

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

    1. 12 and 64
    2. 10 and 64
    3. 10 and 12
    4. 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.

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

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

  4. With the build-or-buy rule, which component do you buy?

    1. A filter that stops heavy resources
    2. A slower pace of requests
    3. A browser build with a coherent fingerprint
    4. 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.

  1. Save the first code example in an empty folder of your lab.
  2. Run it with Node, the flag --experimental-strip-types, and the arguments 300 2 5 5 5 5.
  3. Record the candidates, the attempts, and the decision for each sweep design.
  4. Run it again with the arguments 300 2 5 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

  1. Browserless unit consumption, Browserless, documentation, read 2026-11-20
  2. Overview, Common Crawl, documentation, read 2026-11-20
  3. API:Etiquette, MediaWiki (Wikimedia Foundation), documentation, read 2026-11-20
  4. My model of fixed costs, the cost of a sweep, spend limits, and build or buy, 2026-11 (not public).
  5. 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).