Range lab · Level 3, Quality and Decisions

The lunchtime spike

Design the system, run it against a traffic spike you cannot argue with, and see which of your decisions held. Each learner gets a slightly different spike, so the answer cannot be copied.

The brief

Illustrative case. “NorthBank Lunch” is an invented canteen-ordering app with a web tier, an API tier and a database. Every working day at noon, orders triple for two minutes. Today the app turns away about three orders in ten.

  1. S1. p95 response time at most 800 ms.
  2. S2. At most 1% of requests fail or time out.
  3. S3. Running cost at most 1.50 per hour.

Then a changed condition: the database slows down eightfold for 60 seconds in the middle of the spike. One design must pass both runs. Passing the second needs a different kind of decision from the first.

Design and run

Hints (optional)

Write your decision record

A passing run shows the design works in the model. The record shows you know why. Answer in your own words, about 150 words: which tier failed first and what showed it; what you changed, in what order and what each change cost; what the changed condition exposed and which control answers it; what you gave up and what would make you revisit the design.

Mark yourself

CriterionWeakPartialStrong
EvidenceSays it worked, with no numbers.Quotes some results but not where the first design failed.Names the tier that failed first and quotes your own numbers from the runs.
ReasoningLists changes with no reason.Gives a reason for some changes.Explains why each change fixes the cause the numbers pointed to, in the order you made them.
Trade-offsNo cost or downside named.Names cost or stale data, not both.Names what you paid in money and in stale answers and why that is acceptable here.
Revisit triggerNone.Says it should be checked again.States a measurable event that would make you change the design.
Three sample records to compare with

Weak

I added more servers and the tests passed, so the design is good and ready to use.

Partial

The first run failed with 30% of requests turned away at the web tier. I added a cache and more API servers and the spike passed. For the slow database I turned on the circuit breaker. Cost is 1.47 per hour.

Strong

My first design failed the spike: about 30% of requests were turned away at the web tier, but the busiest tier was the database at the back, which held every web slot while it queued. I cut database reads with a 60% cache (cost 0.15 per hour) before adding servers, then raised web and API servers until the spike passed at 1.47 per hour. The slow database then failed 22% of requests because the API kept waiting and retrying. A 400 ms timeout, a breaker and stale-data fallback brought failures to about 1%, at the price of roughly one answer in eight being stale during the slowdown. I would revisit if stale answers are not acceptable for orders, or if the cache hit ratio falls below 40% in production.

What this lab simulates, and what it cannot prove

The simulator follows individual requests through three tiers: arrivals at random times, a limited number of request slots per server, waiting lines, time-outs, retries with growing delays, a circuit breaker and stale-data fallback. Every number is computed from your seed, so the same design and seed always give the same result and a reviewer can re-run it.

  • It does not model real networks, memory, garbage collection, noisy neighbours, data consistency or your cloud provider's behaviour.
  • Costs are invented units that make over-provisioning visible. They are not prices.
  • A pass is evidence that you reasoned about capacity, waiting and failure. It is not proof that a real system would survive.

Engine 0.2.0. Rules for the model are in range/engine.mjs; the same file runs in the browser and in the tests.