System Design Atlas

Development platform for builds and artifacts

03 / 10Worked example

Scale and contention

What minimum capacity follows from build count and runtime?

The requirements are tested at a concrete, fictional scale: 600 builds/day with a mean runtime of 5 minutes. Average load, peak load and contention are considered separately.

Starting point Bind approval to H-151.

Assumptions for the example case

A fictional example design with one repository, a precisely specified build job, an isolated worker, an immutable artifact identified by digest and explicit release approval. Figures and quality goals are illustrative test assumptions. Full software supply-chain certification, production orchestration and arbitrary privileged builds are outside the scope.

Throughput and the contended resource

Worker Minutes and Artifact Volume

600 × 5 min = 50 worker hours/day120 × 5 ÷ 60 = 10 Workers600 × 200 MiB = 117.1875 GiB
Worker AClaim a generation
Lease B-151Exactly one current
Worker BConcurrent claim / next generation

120 builds within an hour require at least ten fully utilised workers; artifact deduplication follows digest verification.

120 builds arrive within an hour. Plan at least 10 fully utilised workers plus a separate reserve. 600 worker-minutes require 10 worker-hours.

Reproducible test profile calculations

  1. 01

    Average load

    600 builds/day with a mean runtime of 5 minutes

    600 × 5 min = 3,000 worker minutes = 50 worker hours/day

    For the designThe rate describes the assumed total volume; response time still requires measurement.

  2. 02

    Peak test

    120 builds in 60 min × 5 min = 600 worker minutes; at least 10 fully utilized workers without reserve

    600 × 200 MiB = 120,000 MiB = 117.1875 GiB artifacts/day before deduplication

    For the designThe additional quantity calculation defines a separate check of resource or retention needs.

Test concurrency separately

Test oracle
Two workers claim B-151. In either commit order, one receives current execution authorisation. After expiry, a new attempt may start; the old worker can no longer publish a valid completion.

Calculate worker time

Calculate worker time

Plan for at least 10 fully utilised workers plus a separate reserve.

120 builds arrive in an hour.

600 worker minutes fit in 10 worker hours.

Alternative considered
Build count alone ignores runtime.
Trade-off
The reserve must be measured.
Reassess
Build duration or parallelizability change.

Terms in this step

Calculate worker time
600 worker minutes fit in 10 worker hours.

Try it yourself

Calculate the minimum workers for 120 builds lasting five minutes each within one hour.

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
120 times five equals 600 worker minutes.
Second part of the solution
600 divided by 60 gives ten fully utilised workers with no reserve. Waiting time, runtime variation and failures require an additional capacity buffer determined by measurement.

Apply to your project

Which corresponding assumption would you test first in your project? Consider this trigger: Build duration or parallelizability change.

Step 4 distinguishes jobs from attempts.