Introduction au SRE
1 - Qu'est-ce que le SRE ?
1.1 Définition
"SRE is what happens when you ask a software engineer to design an operations function." - Ben Treynor, Google
Site Reliability Engineering = Appliquer les principes du génie logiciel à l'infrastructure et aux opérations.
1.2 Origines
| Année | Événement |
|---|---|
| 2003 | Création du premier team SRE chez Google |
| 2004 | Ben Treynor définit les principes |
| 2016 | Publication du livre "Site Reliability Engineering" |
| 2018 | Publication du "SRE Workbook" |
| 2020+ | Adoption massive dans l'industrie |
2 - SRE vs DevOps
2.1 Comparaison
| Aspect | DevOps | SRE |
|---|---|---|
| Nature | Culture/Movement | Implementation/Job |
| Focus | Collaboration | Reliability |
| Métriques | Variable | SLIs/SLOs |
| Background | Ops → Dev | Dev → Ops |
| Automation | Important | Fondamental |
2.2 Complémentarité
"Class SRE implements interface DevOps" - Google
SRE est une façon concrète d'implémenter DevOps avec des pratiques spécifiques.
3 - Principes fondamentaux
3.1 Les 7 principes SRE
sre_principles:
1_operations_is_software:
description: "Traiter les problèmes ops comme des problèmes software"
example: "Automatiser au lieu de faire manuellement"
2_slos_not_features:
description: "La fiabilité est une feature"
example: "Prioriser la stabilité sur les nouvelles features"
3_work_to_minimize_toil:
description: "Éliminer le travail répétitif manuel"
example: "Automatiser les tâches récurrentes"
4_automate_this_years_job_away:
description: "Automatiser pour libérer du temps"
example: "Scripts, tools, self-healing"
5_move_fast_by_reducing_cost_of_failure:
description: "Réduire le coût des erreurs permet d'aller plus vite"
example: "Canary deployments, rollbacks rapides"
6_share_ownership_with_developers:
description: "Responsabilité partagée"
example: "Devs participent à l'on-call"
7_use_same_tooling:
description: "Mêmes outils pour Dev et SRE"
example: "Monitoring, deployment pipelines"
3.2 Règle du 50%
Objectif : Maximum 50% du temps en opérations, minimum 50% en engineering.
4 - Rôle d'un SRE
4.1 Responsabilités
| Domaine | Activités |
|---|---|
| Availability | SLOs, monitoring, alerting |
| Latency | Performance optimization |
| Performance | Load testing, profiling |
| Efficiency | Resource optimization |
| Change Management | Release engineering |
| Monitoring | Observability stack |
| Emergency Response | Incident management |
| Capacity Planning | Forecasting, scaling |
4.2 Compétences requises
skills:
technical:
- Programming (Python, Go)
- Linux/Unix systems
- Networking
- Cloud platforms
- Kubernetes
- Monitoring tools
soft:
- Problem solving
- Communication
- Collaboration
- Decision making under pressure
- Documentation
5 - Structure d'équipe SRE
5.1 Modèles
5.2 Ratios recommandés
| Type de service | Ratio Dev:SRE |
|---|---|
| Services critiques | 6-8:1 |
| Services standards | 10-12:1 |
| Services matures | 20:1 |
6 - Engagement SRE
6.1 Production Readiness Review (PRR)
prr_checklist:
architecture:
- [ ] Design doc reviewed
- [ ] Dependencies documented
- [ ] Failure modes identified
monitoring:
- [ ] SLIs defined
- [ ] SLOs agreed
- [ ] Dashboards created
- [ ] Alerts configured
operations:
- [ ] Runbooks written
- [ ] On-call training done
- [ ] Escalation path defined
capacity:
- [ ] Load tested
- [ ] Scaling strategy defined
- [ ] Resource limits set
6.2 Critères d'engagement
engagement_criteria:
minimum_requirements:
- SLOs defined and measured
- Error budget policy agreed
- Monitoring in place
- Documentation complete
- On-call rotation shared
exit_criteria:
- Service stable for 6 months
- Dev team trained
- Toil below threshold
- Error budget healthy
7 - Culture SRE
7.1 Blameless Culture
blameless_principles:
- Focus on systems, not people
- Ask "what" not "who"
- Learn from failures
- Share learnings openly
- Encourage experimentation
7.2 Psychological Safety
| Comportement | Encourage |
|---|---|
| Questions "naïves" | Innovation |
| Admission d'erreurs | Amélioration |
| Demande d'aide | Collaboration |
| Challenge du status quo | Excellence |
Résumé
Dans ce chapitre, nous avons découvert :
- La définition du SRE
- La différence avec DevOps
- Les 7 principes fondamentaux
- Le rôle d'un SRE
- Les structures d'équipe
- La culture blameless
Prochaine étape
Dans le prochain chapitre, nous verrons SLIs, SLOs et SLAs.
→ Chapitre suivant : SLIs, SLOs et SLAs