Load testing lab
Test load testing signals and thresholds
Metrics for saturation_rps, p95_ttft_ms, test_usd must distinguish bad input from component failure for capacity planner before Black Friday traffic 3× baseline.
1Learn the idea
Read
Golden signals for this system
Instrument k6 streaming load test for chat completion gateway so capacity planner before Black Friday traffic 3× baseline can answer: demand, errors, latency/age, saturation. Emit fields needed by saturation_rps, p95_ttft_ms, test_usd with bounded labels. Sample successful high-volume traces; keep errors and rollout transitions denser within policy.
Read
Alert path worth paging
Define at least one alert that would fire for LOAD-FALSE-GREEN-33, with a for/pending window that survives deploy blips. Missing scrape or missing revision labels must not look like health. Include a trace/log example id format you will actually search.
Read
Implementation artifact
ttft.add(Date.now() - start);
Read
Tests for telemetry
Add a unit/integration check that metrics increment on the happy path and on the load generator retries hide server shedding — false green branch. Store machine-readable output in CI artifacts when practical.
Read
Stage depth
Cardinality discipline: tenant and revision are usually enough; raw question text is not a label. Exemplars or trace links beat screenshots alone when debugging LOAD-FALSE-GREEN-33. Define who owns alert fatigue review. If you export to a vendor, record retention and access. Synthetic probes should use non-sensitive fixtures and still exercise POST /v1/chat/completions (stream). Practice the query you will type at 2am once, while calm.
Read
Field notes for `load-testing-lab` / `observability`
Document the exact PromQL or log query in the runbook stub for this service. Verify histograms have buckets around your SLO target. Add a canary synthetic check that exercises the oracle path every few minutes in staging. Confirm that PII redaction happens before export. Track build/version as a label on the golden signals. Delete noisy debug logs before they become accidental product dependencies. In this chapter the product is k6 streaming load test for chat completion gateway, the human stakeholder is capacity planner before Black Friday traffic 3× baseline, and the incident id you design against is LOAD-FALSE-GREEN-33. Re-state the oracle in your notes — find saturation knee near 180 RPS; beyond that queue depth explodes — and keep the invariant visible: abort if error_rate > 1% or p95_ttft > 1.5s; test cost ≤ $50. Track saturation_rps, p95_ttft_ms, test_usd as the scoreboard. Surface under change control: POST /v1/chat/completions (stream). If you only have forty minutes, finish the fixture for load generator retries hide server shedding — false green before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.
Read
Extra rehearsal for Load testing lab (observability)
Set a timer for twelve minutes and attempt only the observability concerns for Load testing lab. Speak aloud what capacity planner before Black Friday traffic 3× baseline would see on success versus on load generator retries hide server shedding — false green. Write three bullet artifacts you must keep: a fixture name tied to LOAD-FALSE-GREEN-33, a metric query for saturation_rps, p95_ttft_ms, test_usd, and the rollback or refuse command for POST /v1/chat/completions (stream). Then extend the notes with one sentence on how abort if error_rate > 1% or p95_ttft > 1.5s; test cost ≤ $50 would be violated if you skipped this page. Close by restating the oracle in your own words without looking: find saturation knee near 180 RPS; beyond that queue depth explodes.
Go deeper
Before you start
Why this matters
Name the dashboard row or log line capacity planner before Black Friday traffic 3× baseline opens first during LOAD-FALSE-GREEN-33. It must include a correlation id and a bounded label from saturation_rps, p95_ttft_ms, test_usd. If telemetry is missing, write whether you promote, hold, or roll back — and why hold is the default.
Related lessons
Check your understanding
Page assessment
Answer from memory. Completion is saved from this evidence, not from opening the next page.
All responses are required.