WEEK 12Monday

Reliability

Week 12 · Promises you can measure

WEEK 12Monday

Fourteen hours and thirty-two minutes

flowchart LR
  A["Oct 19, 11:48 PM<br/>DynamoDB endpoint<br/>resolves to nothing"] --> B["2:25 AM<br/>DNS restored"]
  B --> C["until 5:28 AM<br/>EC2 lease manager<br/>retries the whole fleet"]
  C --> D["until 2:09 PM<br/>load balancer<br/>health checks fail"]
  D --> E["2:20 PM<br/>recovered"]
Ask the room

The defect was fixed at 2:25 AM. Why did the outage last until the afternoon?

WEEK 12Monday

Recovery is a behavior

Key point

You design it, or you discover it.

  • Two and a half hours: the defect.
  • Twelve hours: a dependency nobody drew, and a retry every server ran at once.
WEEK 12Monday

Project Pulse promises 99%

The requirement Available at least 99% of each term, deadlines prioritized.

Its own architecture document "No alerting rules or SLOs." Production telemetry not collected.

Ask the room

If Project Pulse were down every Monday at 9 AM, what would notice?

WEEK 12Monday

Fault, error, failure

Project Pulse invitations, before Sept 10
Fault One bad address throws out of the batch
Error The transaction rolls back rows already emailed
Failure A student is invited, then told they were not
WEEK 12Monday

Availability = MTBF / (MTBF + MTTR)

  • You cannot make Azure fail less often.
  • You can make repair fast.
  • Project Pulse's staging slot: a bad release is undone in seconds.

Everything fails, all the time. (Werner Vogels, Amazon CTO)

WEEK 12Monday

Indicator, objective, budget

AVL-uptime, measurable
SLI Share of one-minute health probes that pass
SLO At least 99% over the term
Error budget 112 days × 24 h × 1% ≈ 27 hours
WEEK 12Monday

Twenty-seven hours is one weekend

Pitfall

A Friday deploy that breaks until Monday spends two-thirds of the term.

Key point

Budget left: ship risky changes. Budget gone: the next release is a reliability fix.

WEEK 12Monday

A probe that cannot fail measures nothing

The agent

Project Pulse answers unknown paths with its app page and 200. A probe that checks only the status says "up" for an endpoint that does not exist.

WEEK 12Monday

Every network call needs four decisions

  • Timeout: how long to wait.
  • Retry: whether to try again.
  • Isolation: how far one failure spreads.
  • Degradation: what the user sees instead.
The agent

The agent writes the happy path. It makes none of these four unless you specify them.

WEEK 12Monday

Timeouts have to agree

sequenceDiagram
  participant B as Browser
  participant S as Server
  participant G as Gmail
  B->>S: invite 77 students
  S->>G: email 1 ... email 77
  Note over B: 10 s: "failed"
  G-->>S: all delivered
  S-->>B: (nobody listening)
WEEK 12Monday

Then the admin clicks Send again

  • Each re-invite minted a fresh token.
  • Every link already delivered stopped working.
  • The fix: reuse the token. Re-inviting became idempotent.
Key point

Retry only what is safe to repeat. Then space the retries out, with backoff and jitter.

WEEK 12Monday

Isolation: one bad address, one bad section

for (Section section : sections) {
  try {
    for (Student student : section.getStudents()) {
      try { send(student); }
      catch (RuntimeException e) { log(student, e); }
    }
  } catch (RuntimeException e) { log(section, e); }
}
WEEK 12Monday

Degradation is a requirement

Specified LLM down: everything else works; the AI features say so, within 15 seconds.

Not specified Whatever the agent happened to write.

WEEK 12Monday

Blameless postmortems

  • What happened, and to whom.
  • Timeline.
  • What about the system let a reasonable person do this.
  • Actions that change the system.
Pitfall

"Be more careful" is not an action.

WEEK 12Monday

Checkpoint 3

  • One requirement turned into an SLO: indicator, window, target, budget, measured.
  • One test that makes a dependency fail and checks the specified degradation.
  • Shown red against the code with the handling removed, green against yours.

Reliability

→ space PgDn
Next step or slide
← PgUp
Back
↓ S
Skip to the next slide
O
Overview of all slides
N
Speaker notes
B
Black the screen
Ctrl+P
Print / PDF handout, one slide per page