Operational Excellence
Overview
Operational excellence means your service is observable, alarmed, and documented such that any on-call engineer can understand its health and respond to problems—even at 3 AM without the original author available. This requires dashboards that show the right metrics at the right granularity, alarms that fire at the right thresholds with the right severity, and runbooks that provide actionable steps for each alarm.
When to Use
- Building a new service (operational readiness before launch)
- Reviewing an existing service's operational posture
- After any incident where detection or response was slower than expected
- When onboarding a new team member to on-call
- During operational readiness reviews (ORR)
- When service metrics indicate degradation trends
Agent Persona
Load agents/ops-bar-raiser.md when evaluating dashboards, alarms, runbooks, and operational burden. Use it to challenge whether the service can be diagnosed, mitigated, and rolled back by someone who did not write the code.
Amazon Context
At Amazon, you build it, you own it, you operate it. There is no separate operations team that runs your service. The team that writes the code carries the pager. This means operational excellence is not an afterthought—it's a core competency of every engineer. A service without proper alarms is a service where customers discover problems before you do. A service without runbooks is a service where every incident requires the original author, creating a single point of failure.
The Process
Dashboards
Every service needs three dashboard levels:
Level 1: Customer Experience Dashboard (primary)
- Availability: successful requests / total requests (target: 99.9%+ or per-SLA)
- Latency: p50, p90, p99, p99.9 (separate graphs, not averaged)
- Error rate: 5xx rate, client error rate (4xx), timeout rate
- Throughput: requests per second (to detect traffic anomalies)
- Business metrics: orders/sec, messages delivered/sec, etc.
Level 2: Service Health Dashboard
- Host health: CPU, memory, disk, network across fleet
- Dependency health: latency and error rate to each downstream
- Queue depths, thread pool utilization, connection pool usage
- Cache hit rates, database connection counts
- Deployment markers (vertical lines showing when deploys happened)
Level 3: Deep Dive Dashboard
- Per-endpoint breakdown (latency, errors, throughput)
- Per-customer/tenant breakdown (for multi-tenant services)
- Per-AZ and per-region breakdown
- Garbage collection pauses, JVM metrics (if applicable)
- Detailed dependency call patterns
Alarms
Alarms are categorized by severity and mapped to response actions:
P1: Critical — Customer-facing impact, immediate page
- Availability drops below SLA threshold
- p99 latency exceeds 5x normal for >3 minutes
- Error rate exceeds 5% for >2 minutes
- Complete loss of a dependency
- Response: Immediate page, incident bridge opened within 15 minutes
P2: High — Significant degradation, urgent page
- Availability drops below target but above SLA
- p99 latency exceeds 2x normal for >5 minutes
- Error rate exceeds 1% for >5 minutes
- Single AZ degradation
- Response: Page on-call, response within 15 minutes, escalation within 30 if not mitigated
P3: Medium — Degradation detected, ticket created
- p99 latency trending up (>20% above baseline)
- Error rate above normal but below 1%
- Host health issues (high CPU, disk filling)
- Capacity approaching limits (>80% utilization)
- Response: Ticket created, addressed within business hours, same day
P4: Low — Informational, review during business hours
- Metric anomalies that don't yet impact customers
- Capacity forecasting alerts (weeks out)
- Dependency deprecation warnings
- Stale configuration detected
- Response: Ticket created, addressed within 1 week
Alarm Design Principles
- Alarm on customer impact, not internal state. High CPU is not a customer problem until latency increases.
- Alarm on rate of change, not just thresholds. A sudden spike from 1ms to 50ms p99 matters even if 50ms is "acceptable."
- Every alarm has a runbook. An alarm without a runbook is just noise.
- Tune regularly. An alarm that fires weekly without action is worse than no alarm (alert fatigue).
- Use composite alarms. Combine signals to reduce false positives (e.g., high latency AND high error rate).
Runbooks
Every alarm links to a runbook that contains:
- What this alarm means: Plain English description of what triggered
- Customer impact: What customers are experiencing right now
- Immediate actions: Steps to mitigate (not debug) within first 5 minutes
- Diagnosis steps: How to determine root cause
- Escalation path: Who to contact if you can't resolve
- Recent changes: How to check what changed recently (deploys, configs)
- Known causes: List of past incidents with this alarm and their resolutions
- Rollback instructions: How to undo the most recent change
Mechanisms Over Good Intentions
| Intention |
Mechanism |
| "I'll add dashboards before launch" |
Operational readiness review blocks launch without dashboards |
| "I'll write runbooks when I have time" |
Every alarm creation requires a runbook link. No link = alarm rejected |
| "I'll tune alarms when they get noisy" |
Monthly alarm review meeting. Alarms that fire >5x without action are auto-escalated to manager |
| "I'll monitor after deployment" |
Deployment dashboard auto-opens on deploy. Bake time requires green metrics |
Common Rationalizations
| What They Say |
Why It's Wrong |
What To Do Instead |
| "We'll add monitoring after MVP" |
If you can't tell if MVP is working, you can't iterate on it |
Monitoring is part of MVP. Ship metrics before features if you must prioritize |
| "Our error rate is fine at 0.5%" |
0.5% of 10M requests/day = 50,000 customer failures |
Set targets based on absolute customer impact, not just percentages |
| "The alarm is too noisy, I'll suppress it" |
Noisy alarms are a sign of a real problem (either the alarm or the service) |
Fix the alarm threshold or fix the underlying issue. Never suppress without investigation |
| "We don't need p99.9, p99 is enough" |
Your worst-affected customers live at p99.9. They're often your biggest customers |
Monitor p99.9. Alert on p99. Dashboard shows p99.9 for awareness |
Red Flags
- No dashboard exists for the service
- Dashboard exists but no one looks at it regularly
- Alarms fire but no one responds (alert fatigue)
- Alarms have no runbooks
- Runbooks say "contact [specific person]" as the only action
- No alarm coverage for a critical dependency
- p99 latency not monitored (only average)
- No business metrics on the dashboard
- Alarm thresholds haven't been reviewed in 6+ months
- On-call doesn't know which dashboard to look at first
Verification
Tenets
- If you can't measure it, you can't operate it. Every behavior that matters to customers must have a metric.
- Customers should never discover problems before you do. Alarms must fire before customer complaints arrive.
- Dashboards are for understanding, not decoration. If no one looks at it during incidents, it's not useful.
- Every alarm is a contract with the on-call engineer. It promises: "this is worth waking you up, and here's what to do about it."
- Operational excellence is not optional for launch. A service without observability is a service you're operating blind.
1---2name: operational-excellence3description: Dashboards, alarms, and runbooks that make a service operable. Covers latency, error rate, availability, throughput, and severity-based alarming.4---56# Operational Excellence78## Overview910Operational excellence means your service is observable, alarmed, and documented such that any on-call engineer can understand its health and respond to problems—even at 3 AM without the original author available. This requires dashboards that show the right metrics at the right granularity, alarms that fire at the right thresholds with the right severity, and runbooks that provide actionable steps for each alarm.1112## When to Use1314- Building a new service (operational readiness before launch)15- Reviewing an existing service's operational posture16- After any incident where detection or response was slower than expected17- When onboarding a new team member to on-call18- During operational readiness reviews (ORR)19- When service metrics indicate degradation trends2021## Agent Persona2223Load `agents/ops-bar-raiser.md` when evaluating dashboards, alarms, runbooks, and operational burden. Use it to challenge whether the service can be diagnosed, mitigated, and rolled back by someone who did not write the code.2425## Amazon Context2627At Amazon, you build it, you own it, you operate it. There is no separate operations team that runs your service. The team that writes the code carries the pager. This means operational excellence is not an afterthought—it's a core competency of every engineer. A service without proper alarms is a service where customers discover problems before you do. A service without runbooks is a service where every incident requires the original author, creating a single point of failure.2829## The Process3031### Dashboards3233Every service needs three dashboard levels:3435**Level 1: Customer Experience Dashboard (primary)**36- Availability: successful requests / total requests (target: 99.9%+ or per-SLA)37- Latency: p50, p90, p99, p99.9 (separate graphs, not averaged)38- Error rate: 5xx rate, client error rate (4xx), timeout rate39- Throughput: requests per second (to detect traffic anomalies)40- Business metrics: orders/sec, messages delivered/sec, etc.4142**Level 2: Service Health Dashboard**43- Host health: CPU, memory, disk, network across fleet44- Dependency health: latency and error rate to each downstream45- Queue depths, thread pool utilization, connection pool usage46- Cache hit rates, database connection counts47- Deployment markers (vertical lines showing when deploys happened)4849**Level 3: Deep Dive Dashboard**50- Per-endpoint breakdown (latency, errors, throughput)51- Per-customer/tenant breakdown (for multi-tenant services)52- Per-AZ and per-region breakdown53- Garbage collection pauses, JVM metrics (if applicable)54- Detailed dependency call patterns5556### Alarms5758Alarms are categorized by severity and mapped to response actions:5960**P1: Critical — Customer-facing impact, immediate page**61- Availability drops below SLA threshold62- p99 latency exceeds 5x normal for >3 minutes63- Error rate exceeds 5% for >2 minutes64- Complete loss of a dependency65- Response: Immediate page, incident bridge opened within 15 minutes6667**P2: High — Significant degradation, urgent page**68- Availability drops below target but above SLA69- p99 latency exceeds 2x normal for >5 minutes70- Error rate exceeds 1% for >5 minutes71- Single AZ degradation72- Response: Page on-call, response within 15 minutes, escalation within 30 if not mitigated7374**P3: Medium — Degradation detected, ticket created**75- p99 latency trending up (>20% above baseline)76- Error rate above normal but below 1%77- Host health issues (high CPU, disk filling)78- Capacity approaching limits (>80% utilization)79- Response: Ticket created, addressed within business hours, same day8081**P4: Low — Informational, review during business hours**82- Metric anomalies that don't yet impact customers83- Capacity forecasting alerts (weeks out)84- Dependency deprecation warnings85- Stale configuration detected86- Response: Ticket created, addressed within 1 week8788### Alarm Design Principles8990- **Alarm on customer impact, not internal state.** High CPU is not a customer problem until latency increases.91- **Alarm on rate of change, not just thresholds.** A sudden spike from 1ms to 50ms p99 matters even if 50ms is "acceptable."92- **Every alarm has a runbook.** An alarm without a runbook is just noise.93- **Tune regularly.** An alarm that fires weekly without action is worse than no alarm (alert fatigue).94- **Use composite alarms.** Combine signals to reduce false positives (e.g., high latency AND high error rate).9596### Runbooks9798Every alarm links to a runbook that contains:991001. **What this alarm means**: Plain English description of what triggered1012. **Customer impact**: What customers are experiencing right now1023. **Immediate actions**: Steps to mitigate (not debug) within first 5 minutes1034. **Diagnosis steps**: How to determine root cause1045. **Escalation path**: Who to contact if you can't resolve1056. **Recent changes**: How to check what changed recently (deploys, configs)1067. **Known causes**: List of past incidents with this alarm and their resolutions1078. **Rollback instructions**: How to undo the most recent change108109## Mechanisms Over Good Intentions110111| Intention | Mechanism |112|-----------|-----------|113| "I'll add dashboards before launch" | Operational readiness review blocks launch without dashboards |114| "I'll write runbooks when I have time" | Every alarm creation requires a runbook link. No link = alarm rejected |115| "I'll tune alarms when they get noisy" | Monthly alarm review meeting. Alarms that fire >5x without action are auto-escalated to manager |116| "I'll monitor after deployment" | Deployment dashboard auto-opens on deploy. Bake time requires green metrics |117118## Common Rationalizations119120| What They Say | Why It's Wrong | What To Do Instead |121|---------------|---------------|-------------------|122| "We'll add monitoring after MVP" | If you can't tell if MVP is working, you can't iterate on it | Monitoring is part of MVP. Ship metrics before features if you must prioritize |123| "Our error rate is fine at 0.5%" | 0.5% of 10M requests/day = 50,000 customer failures | Set targets based on absolute customer impact, not just percentages |124| "The alarm is too noisy, I'll suppress it" | Noisy alarms are a sign of a real problem (either the alarm or the service) | Fix the alarm threshold or fix the underlying issue. Never suppress without investigation |125| "We don't need p99.9, p99 is enough" | Your worst-affected customers live at p99.9. They're often your biggest customers | Monitor p99.9. Alert on p99. Dashboard shows p99.9 for awareness |126127## Red Flags128129- No dashboard exists for the service130- Dashboard exists but no one looks at it regularly131- Alarms fire but no one responds (alert fatigue)132- Alarms have no runbooks133- Runbooks say "contact [specific person]" as the only action134- No alarm coverage for a critical dependency135- p99 latency not monitored (only average)136- No business metrics on the dashboard137- Alarm thresholds haven't been reviewed in 6+ months138- On-call doesn't know which dashboard to look at first139140## Verification141142- [ ] Customer Experience Dashboard exists with availability, latency (p50/p99), errors, throughput143- [ ] Service Health Dashboard exists with host metrics, dependency health, resource utilization144- [ ] P1 and P2 alarms defined for availability and latency145- [ ] Every alarm links to a runbook with actionable steps146- [ ] Alarms tested (confirmed they fire when conditions are met)147- [ ] Runbooks reviewed and updated within last 90 days148- [ ] On-call engineer can find the right dashboard within 30 seconds149- [ ] Alert fatigue score: <2 false-positive pages per on-call rotation150- [ ] Business metrics represented on dashboard151- [ ] Alarm thresholds reviewed quarterly152153## Tenets1541551. **If you can't measure it, you can't operate it.** Every behavior that matters to customers must have a metric.1562. **Customers should never discover problems before you do.** Alarms must fire before customer complaints arrive.1573. **Dashboards are for understanding, not decoration.** If no one looks at it during incidents, it's not useful.1584. **Every alarm is a contract with the on-call engineer.** It promises: "this is worth waking you up, and here's what to do about it."1595. **Operational excellence is not optional for launch.** A service without observability is a service you're operating blind.