Master

Shipping a server that is bounded

The end state is a server where every number that bounds it is written in one place. The place is what makes a limit a claim rather than a habit.

What you will see

One line with both numbers and a date. That line is the record of the decision.

About 1 min of reading

Try It

Write the limits and prove a refusal

1

Write the limits file

printf 'body_bytes 4096\npool 64\nidle_ms 5000\ndrain_ms 5000\n' > /tmp/lim.txt; wc -l < /tmp/lim.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
4. Four numbers is the whole contract of the server.
2

Attempt a run that breaches one

printf 'idle_ms 9000\n' | awk '{print ($1>5000) ? "refuse" : "run"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
refuse. The refusal came from the file, not from a person reading it.
3

Name the breached limit

printf 'refuse limit=idle_ms used=9000 max=5000 date=2026-10-10\n' >> /tmp/stops.txt; tail -1 /tmp/stops.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with both numbers and a date. That line is the record of the decision.

Data Flow

A server to a shippable claim
1 The limits file is written
↓
2 The suite gates the deploy
↓
3 The load run stamps the shape
↓
4 A breach refuses and names the limit
Why this works
Why the limits are enforced by the server

The server is the component that acts. A limit remembered by a person is a limit that will be exceeded.

The end state of this subject

A server that refuses more than it accepts. That is the state where every claim is a number in a file.

Examples

The limits are one file

Body size, pool size, timeouts, drain. One file, and the file is the contract of the server.

The suite and the load run are both artefacts

Correctness and shape. Two artefacts, and the two are the whole claim of a release.

The open cases are the honest list

Inputs not tried and loads not run. The list is short, and the shortness is the claim.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Testing a server without a client
Previous Lesson
Testing a server without a client