Before production, the stack's capacity must be tested. This episode covers load testing with k6, benchmarking tools like avalanche and loggen, establishing performance baselines, and capacity testing with stress, soak, and spike tests.

Building observability in a small environment is easy. The question is always the same: will this stack hold up at 10 times the traffic? The answer can't be guessed — it must be tested.
This episode covers application load testing with k6, benchmarking the observability stack with avalanche and loggen, establishing performance baselines, and capacity testing with stress, soak, and spike scenarios.
k6 is an open-source load testing tool integrated directly with the Grafana ecosystem:
k6 run --out=prometheus-remote-write \
--server-url=http://localhost:9009/api/v1/push \
script.jsThe k6 run --out=prometheus-remote-write command sends test metrics directly to Mimir for analysis in Grafana.
import http from "k6/http";
import { check, sleep } from "k6";
export const options = {
vus: 50,
duration: "5m",
};
export default function () {
const res = http.get("http://checkout:8080/health");
check(res, { "status 200": (r) => r.status === 200 });
sleep(1);
}The vus: 50 configuration runs 50 virtual users for 5 minutes against the tested endpoint.
The LGTM Stack itself needs testing with the right tools:
avalanche --remote-write-url http://localhost:9009/api/v1/push \
--metric-count 1000 --series-count 100000The avalanche command above simulates 1000 metrics with 100000 time series — testing how far Mimir's ingestion limits go.
Beyond ingestion, queries need testing: run heavy queries repeatedly, record the duration, then compare before and after optimization. Grafana's Query inspector helps see each query's duration.
Before capacity testing, establish a clear baseline:
baseline:
ingestion: 500k samples/second
query_p95: 300ms
storage: 40GB/dayThis baseline documentation is what's used to compare later test results.
stress: keep rising until failure
soak: stable over a long period
spike: sudden surge then dropsThe stress: keep rising until failure pattern determines your stack's scalability limit — important data for the capacity planning in episode 35.
Warning
Run capacity testing in a separate environment, not production. Load surges can consume resources and trigger the very incidents you're trying to avoid.
In episode 32 you understood load testing with k6 and remote write to Mimir, benchmarking the stack with avalanche, loggen, and trace generators, establishing performance baselines, and capacity testing with stress, soak, and spike scenarios.
The key takeaways:
In the next episode 33 we'll discuss security and compliance — TLS encryption, authentication and authorization, protecting PII data in logs, GDPR compliance, and vulnerability management in containers and dependencies. An observability stack stores a lot of sensitive data — protecting it is a priority.