TRT
Sign in

Start System Design With a Workload Model

A workload model describes request rates, payload sizes, read/write mix, burstiness, and latency goals. If one million users each make two requests per day, the average is far below the peak if activity clusters around a short window.

The Runtime Theory Team05 stages

trace / request.md

CONTRACTREPRESENTATIONOPERATIONBOUNDARYRESULT

readyA workload model describes request rates, payload sizes, read/write mix, burstiness, and latency goals. Capacity estimates are useful when they expose assumptions and identify dominant resource costs; a single total-user count rarely predicts the load a system must handle.

Walk the stages in order for Start System Design With a Workload Model: start from the contract, trace the representation through the operation, then confirm the boundary. Worked case: If one million users each make two requests per day, the average is far below the peak if activity clusters around a short window. For a worked explanation, continue to the topic article and execution trace.

Stage-by-stage execution walkthrough

This request flow decomposes Start System Design With a Workload Model into 5 sequential stages so you can trace where latency accumulates, which state transitions are irreversible, and where production failure modes occur.

Stage 1: Contract

A workload model describes request rates, payload sizes, read/write mix, burstiness, and latency goals. Capacity estimates are useful when they expose assumptions and identify dominant resource costs; a single total-user count rarely predicts the load a system must handle. During this transition, the runtime enforces strict state invariants before handing control to the next stage: inputs are validated at the boundary, state mutations are ordered deterministically, and latency/resource costs are bounded so downstream consumers never observe a torn or partially initialized state.

Stage 2: Representation

If one million users each make two requests per day, the average is far below the peak if activity clusters around a short window. Estimate average and peak requests per second, then multiply by bytes, storage retention, and downstream calls. State whether retries and background jobs are included. During this transition, the runtime enforces strict state invariants before handing control to the next stage: inputs are validated at the boundary, state mutations are ordered deterministically, and latency/resource costs are bounded so downstream consumers never observe a torn or partially initialized state.

Stage 3: Operation

Estimate storage for event records given an arrival rate, average encoded size, and retention period. Then name two additional factors needed before sizing the database. During this transition, the runtime enforces strict state invariants before handing control to the next stage: inputs are validated at the boundary, state mutations are ordered deterministically, and latency/resource costs are bounded so downstream consumers never observe a torn or partially initialized state.

Stage 4: Boundary

Back-of-the-envelope numbers are ranges, not promises. Cache hit rate, hot keys, payload distribution, and fan-out can change capacity sharply. Averages hide tail latency and bursts, so design headroom and measure the real workload before purchasing or sharding capacity. During this transition, the runtime enforces strict state invariants before handing control to the next stage: inputs are validated at the boundary, state mutations are ordered deterministically, and latency/resource costs are bounded so downstream consumers never observe a torn or partially initialized state.

Stage 5: Result

Estimate storage for event records given an arrival rate, average encoded size, and retention period. Then name two additional factors needed before sizing the database. During this transition, the runtime enforces strict state invariants before handing control to the next stage: inputs are validated at the boundary, state mutations are ordered deterministically, and latency/resource costs are bounded so downstream consumers never observe a torn or partially initialized state.

Production invariants and failure modes

Done when the worked check holds: Estimate storage for event records given an arrival rate, average encoded size, and retention period. When debugging or capacity-planning this flow in production, instrument each stage boundary separately (measuring both p50 median and p99.9 tail latency), verify what happens when an intermediate stage times out or drops packets, and ensure retry or fallback paths preserve end-to-end idempotency.

Not started

Sign in to save your learning progress.

Sign in to save