Metrics stack for a multi-replica stub fleet on kind
CPU · your Maccli150 minrequiredGoal · Prometheus and Grafana on kind scraping three replicas of the Phase 5 stub server, with a dashboard showing TTFT and ITL percentiles per replica and an alert on queue depth.
- 1Extend stub_server.py from the resilience topic to export histograms time_to_first_token_seconds and time_per_output_token_seconds and gauges for waiting and running requests, with a replica label from the pod name.
- 2Install kube-prometheus-stack via Helm on kind; add a ServiceMonitor for the stub Service.
- 3Write recording rules for p50 and p99 of both histograms using histogram_quantile over 1 minute windows.
- 4Build a Grafana dashboard with panels for TTFT p99 per replica, ITL p99 per replica, waiting requests, and tokens per second.
- 5Add a PrometheusRule alert that fires when waiting requests exceed 10 for 2 minutes; drive load to trigger it and screenshot the firing alert.
- 6Inject a 300 ms sleep into one replica only via an environment variable and show its line separating on the dashboard.
- Deliverable
- Manifests, the dashboard JSON, and two screenshots (alert firing, straggler replica visible).
- Check
- The dashboard shows three distinct replica series; the slowed replica's ITL p99 is at least 200 ms above the others; the alert transitions to firing under load.