LS·205
Phase 9 — Observability and SRE
The ninth phase: logs, metrics, traces, OpenTelemetry, SLOs, alerting, incident response, load testing and disaster recovery, ending with the system broken on purpose and diagnosed from telemetry; the order and why, an entry check, step-by-step exit checks mapped to Volumes 9, 11 and 16, the project with milestones and definitions of done, traps, a time budget, and a lab comparing threshold alerts with error-budget burn-rate alerts.
Start here: Phase 9 in one page
By now your system has a frontend, a backend, a database, a cache, containers, a cloud deployment and an event-driven subsystem. Something in it will break. Phase 9 is about knowing that it broke (alerts tied to what users experience), where and why (logs, metrics, traces), and what to do (incident response, load testing, recovery). The project deliberately breaks the system and requires you to diagnose each failure from telemetry alone.
The sequence
logs → metrics → traces → OpenTelemetry → SLOs → alerting → incident response → load testing → DR
The three signals first, then the standard that produces them (OpenTelemetry). Then SLOs, which define "working" from the user's side, and alerting built on them. Then the human process (incident response), then proactive practices: load testing before users find the limits, and disaster recovery before you need it.
Alerting on what matters
The lab simulated a month of traffic for a service with a 99.9% availability SLO (an error budget of 8,640 failed requests), with a 30-minute outage, a 2-day mild degradation (0.5% errors) and a 4-minute blip:
| Alert rule | Pages fired | Outage | 2-day degradation | 4-minute blip |
|---|---|---|---|---|
| error rate > 1% over 5 min | 20 | caught at once | flapped 18 times | paged |
| burn-rate page (fast budget burn) | 1 | caught after 8 min | not paged | not paged |
| burn-rate ticket (slow budget burn) | 3 | — | caught after 7.75 h | ignored |
The threshold alert woke someone 20 times, mostly for one slow problem it kept detecting and forgetting. Burn-rate alerts paged once for the outage, raised a ticket for the slow degradation (which used a third of the month's budget), and stayed quiet for a blip that didn't threaten the SLO.
How deep to go in Phase 9
Volume 17 defines six mastery levels; Phase 9's exit targets are:
| Topic | Exit level | What that means here |
|---|---|---|
| logs, metrics, traces, OpenTelemetry | L3 | instrument services; explain cardinality, sampling, context propagation |
| SLOs and alerting | L3 | define SLIs/SLOs; multi-window burn-rate alerts |
| incident response | L2–L3 | roles, communication, mitigation, postmortems |
| load testing | L3 | open-model tests, saturation, capacity curves |
| disaster recovery | L2–L3 | backups, PITR, RPO/RTO measured by drills |
The sequence, step by step
| Step | Learn | Read | Exit check |
|---|---|---|---|
| 1 | the signals | Vol. 9, Start Here, ch. 97 | say which signal answers which question |
| 2 | OpenTelemetry, logging, metrics, tracing | Vol. 9, ch. 98–101 | one trace across frontend, backend, database and consumer |
| 3 | SLIs, SLOs, error budgets | Vol. 9, ch. 102 | SLOs for your two most important user journeys |
| 4 | alerting | Vol. 9, ch. 102 | burn-rate alerts for each SLO, tested with injected errors |
| 5 | incident management | Vol. 9, ch. 103 | run a mock incident with roles and a postmortem |
| 6 | reliability and performance engineering | Vol. 9, ch. 104–105 | find and fix one bottleneck from profiles |
| 7 | performance and chaos testing | Vol. 11, ch. 119–120 | a capacity curve to saturation |
| 8 | readiness and disaster recovery | Vol. 16, ch. 189, 193 | a timed point-in-time restore |
Entry check
Phases 6–8: the application running in containers (locally or in the cloud) with several services.
The phase project: break the system on purpose and diagnose it from telemetry
Goal. Prove your observability works by having someone else inject failures you must find from dashboards, traces and logs alone.
Milestones. OpenTelemetry instrumentation everywhere (frontend RUM to database) → structured logs with trace IDs → RED and USE dashboards → SLOs and burn-rate alerts → runbooks linked from alerts → a failure menu for a partner to inject (slow query, lock contention, memory leak, dependency outage, bad deploy, full disk, consumer lag, DNS failure) → for each: detection time, diagnosis path, mitigation, and the telemetry gap found → a load test to saturation → a timed restore drill.
Done when. For at least six injected failures you identified the cause from telemetry, with detection and diagnosis times recorded; every telemetry gap found has been fixed; alerts are SLO-based with no flapping; RTO and RPO are measured.
Stretch. Run a full game day (Volume 16's case study) with a scored postmortem.
Common traps
- Dashboards without SLOs: lots of graphs, no definition of "working".
- Alerting on causes (CPU, memory) instead of symptoms users feel.
- High-cardinality labels that make metrics expensive.
- Logs without trace IDs, so signals can't be joined.
- Untested backups.
Exit criteria
- [ ] The project meets its "done when" list.
- [ ] I can follow one request across services in a trace and find where time went.
- [ ] I can write SLOs and burn-rate alerts and explain their windows.
- [ ] I can run an incident and write a blameless postmortem.
- [ ] I scored at least 80% on 40 questions from Volume 9's quizzes, twice.
Time budget
Volume 9 (about 52,000 words) plus the named chapters of Volumes 11 and 16 (about 20,000) is about 5 hours of reading; with practice, about 21 hours, plus 2–3 weeks for the project: about 5–6 weeks at 8 hours a week.
Lab: threshold alerts vs burn-rate alerts
Setup. A simulation in NumPy (no real service is needed to compare alert rules, and simulation lets the incidents be identical for every rule): 30 days × 1,440 minutes, 200 requests per minute, background error rate 0.05%; incidents: a 30-minute outage (10% errors) on day 10, a 2-day degradation (0.5% errors) from day 20, and a 4-minute blip (3% errors) on day 5. SLO: 99.9% of requests succeed over 30 days, an error budget of 8,640 failed requests (the outage used 609 and the degradation 2,811).
Rules compared:
- threshold: error rate over the last 5 minutes > 1%.
- burn-rate page (multi-window, from the Google SRE workbook): burn rate > 14.4 over both 1 h and 5 min, or > 6 over both 6 h and 30 min (burn rate = error rate ÷ 0.1%).
- burn-rate ticket: > 3 over both 1 day and 2 h, or > 1 over both 3 days and 6 h.
Results
| Rule | Alerts fired | Outage | 2-day degradation | 4-minute blip | Alerts outside incidents |
|---|---|---|---|---|---|
| threshold | 20 | at minute 0 | 18 separate alerts from minute 21, each 1–4 minutes long | paged at minute 1 | 0 |
| burn-rate page | 1 | after 8 min | not paged | not paged | 0 |
| burn-rate ticket | 3 | after 21 min (the long windows saw it too) | after 465 min | not raised | 1 (a 4-minute re-fire 5 h after the degradation ended, from the 3-day window) |
Reading the results
- The threshold rule was fast, and unusable: at 0.5% errors and 1,000 requests per 5 minutes, chance alone pushed the measured rate over 1% again and again. Eighteen short pages in two days teach on-call to ignore alerts.
- The burn-rate page fired once, for the event that threatened the SLO within hours (the outage burned budget at ~100×). Waiting for the 5-minute window to confirm the 1-hour window cost 8 minutes of detection time, the price of not paging for blips.
- The slow degradation never burned fast enough to page, but consumed a third of the month's budget; the ticket rule caught it within a working day, which is the right urgency.
- Long windows linger: the ticket rule re-fired briefly after recovery. Real setups pair each long window with a short one (as these do) and suppress tickets while one is open.
Try it yourself
- Halve the traffic (100 requests per minute) and rerun: what happens to the threshold rule's flapping?
- Add a 30-minute outage at 2% errors: which rule pages, and when?
- Implement the burn-rate rules as Prometheus recording and alerting rules for your service and test them with injected errors.
- Compute how much budget each incident used and decide which would justify freezing feature releases.
Revision sheet: Phase 9, observability and SRE
Key ideas
- Sequence: logs → metrics → traces → OpenTelemetry → SLOs → alerting → incident response → load testing → DR.
- SLOs define "working" from users' view; error budgets turn reliability into a decision tool.
- Alert on burn rate with paired long and short windows: page for fast burns, ticket for slow ones.
- Incidents: roles, mitigation first, blameless postmortems with action items.
- Prove capacity and recovery with load tests and timed drills.
Numbers to remember
- 99.9% over 30 days = 43.2 minutes of full downtime, or 0.1% of requests.
- Burn-rate thresholds: 14.4 (1 h/5 min) and 6 (6 h/30 min) page; 3 (1 d/2 h) and 1 (3 d/6 h) ticket.
- Lab: threshold rule fired 20 times (18 flaps); burn-rate page once; ticket caught the slow degradation in 7.75 h.
- Budget: ~21 study hours + 2–3 project weeks ≈ 5–6 weeks at 8 h/week.
Pitfalls
- Cause-based and threshold alerts that flap.
- Dashboards with no SLOs.
- Logs that can't be joined to traces.
- Untested recovery.
Glossary
- SLI / SLO / SLA: indicator / objective / contractual agreement.
- Error budget: allowed unreliability.
- Burn rate: speed of budget consumption relative to the SLO (1 = exactly on budget).
- RED / USE: rate-errors-duration for services; utilisation-saturation-errors for resources.
- Postmortem: a blameless written analysis of an incident.