Load tests and service limits
Quick answer
A bounded load test measures service behavior under specified arrivals, concurrency, deadlines and resource budgets. Reliability includes correct results, rejection rates, tail latency, recovery and observability—not just fast successful calls. Examples use Python and NumPy 2.3.5. Timing examples use fixed synthetic values; actual benchmark timings are in the milestone. ByteMind execution is unverified.
Reliability denominator
offered=100; correct_and_timely=92print(correct_and_timely/offered)Expected output (locally tested): 0.92. Rejected and late requests remain in the denominator.
How it works
Begin with an isolated local fixture, fixed request limit and warmup. Record offered work, accepted work, completed work, timeouts and explicit rejections. Throughput under saturation may plateau while backlog grows; a bounded queue trades some rejections for predictable resource use. Use a fixed deadline and bounded retries with backoff, and distinguish timeout from cancellation. Define a service-level indicator such as fraction of all offered requests completed correctly within 50 ms; rejected requests count against this definition. A service-level objective is a target over a stated window, not a guarantee from a tiny benchmark. Record p50/p95 sample count, model version, workload, hardware and timing boundary; measure accuracy and memory separately. Compare scalar versus vectorized CPU computation using identical inputs, and do not infer network service capacity from in-process timings. A production gate needs representative traffic, security, recovery and independent approval.
Vectorized CPU scoring
import numpy as npx=np.array([[1,2],[3,4]]);w=np.array([2,1])print((x@w).tolist())Expected output (locally tested): [4, 10]. One matrix operation handles both rows.
Common mistakes
Do not generate uncontrolled requests or target a remote system. Do not discard rejections from the reliability denominator. Do not declare success based only on average latency.
Practice and next steps
Calculate the good-request fraction for a fixture with slow, failed and rejected requests. Reduce the queue limit in a simulation and inspect rejections.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Load tests and service limits — knowledge check
Apply load tests and service limits to small examples and debugging scenarios.
What must count in the stated all-offered reliability denominator?
What may happen at saturation?
Where should this load test run?
What does a timeout prove?
What is a production readiness requirement?