Site Reliability Engineering — DevOps

Apa itu SRE? Site Reliability Engineering adalah disiplin yang menggabungkan software engineering dan operations. Diciptakan oleh Google untuk memastikan sistem

Apa itu SRE?

Site Reliability Engineering adalah disiplin yang menggabungkan software engineering dan operations. Diciptakan oleh Google untuk memastikan sistem berjalan reliabel di skala besar.

SLI, SLO, dan SLA

Error Budget

Error budget adalah jumlah downtime atau error yang masih "diizinkan" berdasarkan SLO. Selama error budget belum habis, tim boleh mengambil risiko dengan merilis fitur baru.

SLO: 99.9% availability per bulan (30 hari)

Error budget = 100% - 99.9% = 0.1%
= 0.001 × 30 × 24 × 60 = 43.2 menit downtime per bulan

Jika error budget habis:
→ Stop feature release
→ Fokus perbaikan reliability
→ Baru lanjut develop setelah budget pulih

Toil Reduction

Toil adalah pekerjaan manual, repetitif, yang bisa diotomasi:

Post-Mortem (Blameless)

## Incident Post-Mortem: Database Outage 2024-01-15

**Duration**: 23 minutes (14:05 - 14:28)
**Impact**: 100% API requests failed
**Severity**: SEV1

**Timeline**:
- 14:05 - Alert: Database connection pool exhausted
- 14:08 - On-call engineer acknowledged
- 14:15 - Root cause identified: N+1 query in new feature
- 14:25 - Hotfix deployed, connections recovering
- 14:28 - All systems normal

**Root Cause**: New API endpoint had N+1 query, each request opened 50+ connections

**Action Items**:
- [ ] Add query count limit middleware
- [ ] Add connection pool monitoring alert
- [ ] Add N+1 detection in CI pipeline

Yang akan kamu pelajari