Files
2nd/10_Wiki/Topics/DevOps_and_Security/카오스 몽키(Chaos Monkey).md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

209 lines
6.0 KiB
Markdown

---
id: wiki-2026-0508-카오스-몽키-chaos-monkey
title: 카오스 몽키(Chaos Monkey)
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Chaos Monkey, Chaos Engineering, Netflix Simian Army]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [chaos-engineering, sre, resilience, reliability, devops]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: go
framework: kubernetes
---
# 카오스 몽키(Chaos Monkey)
## 매 한 줄
> **"매 random instance termination, 매 production 의 의"**. 매 2010 Netflix 의 의 의 release 의 chaos engineering 의 의 의 origin tool — 매 production cluster 의 의 random instance 의 의 의 kill 의 의 system 의 의 self-heal 의 verify. 매 2026 — 매 Litmus, Chaos Mesh, Gremlin 의 의 의 Kubernetes 의 native.
## 매 핵심
### 매 Chaos Monkey origin
- 매 2010, Netflix 의 의 AWS 의 의 의 migration 의 의 trigger.
- 매 hypothesis: "매 instance 의 의 의 die — 매 inevitable. 매 production 의 의 의 의 simulate 의 의 의 resilience 의 의 의 confirm".
- 매 OSS 2012 — 매 Simian Army (Chaos Monkey, Chaos Gorilla, Chaos Kong, Latency Monkey, etc.).
### 매 Chaos engineering 의 의 의 5 principles (Netflix)
1. 매 hypothesis 의 의 의 build (steady-state).
2. 매 real-world event 의 의 vary (instance fail, network partition).
3. 매 production 의 의 의 의 run.
4. 매 automate 의 의 의 의 continuous.
5. 매 blast radius 의 의 의 minimize.
### 매 Failure injection 의 의 의 categories
- **Resource** — CPU / memory / disk / network exhaustion.
- **State** — 매 process kill, 매 container OOM.
- **Network** — latency, packet loss, partition.
- **Time** — clock skew.
- **Application** — exception throw, response delay.
### 매 2026 Tooling
| Tool | 매 platform | 매 특성 |
|---|---|---|
| Chaos Mesh | k8s | 매 CNCF, declarative CRD |
| LitmusChaos | k8s | 매 CNCF, GitOps native |
| Gremlin | multi | 매 commercial, full-spectrum |
| AWS FIS | AWS | 매 managed, IAM-aware |
| Pumba | docker | 매 lightweight |
## 💻 패턴
### 매 Chaos Mesh — pod kill
```yaml
apiVersion: chaos-mesh.org/v1alpha1
kind: PodChaos
metadata:
name: pod-failure-example
namespace: chaos-testing
spec:
action: pod-failure
mode: one
duration: "30s"
selector:
labelSelectors:
app: payment-service
scheduler:
cron: "@every 10m"
```
### 매 Network latency injection
```yaml
apiVersion: chaos-mesh.org/v1alpha1
kind: NetworkChaos
metadata:
name: delay-pods
spec:
action: delay
mode: all
selector:
labelSelectors:
app: api
delay:
latency: "500ms"
jitter: "100ms"
duration: "5m"
```
### 매 LitmusChaos — CPU stress
```yaml
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: cpu-hog
spec:
appinfo:
appns: prod
applabel: "app=worker"
experiments:
- name: pod-cpu-hog
spec:
components:
env:
- name: TOTAL_CHAOS_DURATION
value: "60"
- name: CPU_CORES
value: "2"
```
### 매 AWS Fault Injection Simulator
```json
{
"actions": {
"stopInstances": {
"actionId": "aws:ec2:stop-instances",
"parameters": { "duration": "PT5M" },
"targets": { "Instances": "ec2-prod-asg" }
}
},
"targets": {
"ec2-prod-asg": {
"resourceType": "aws:ec2:instance",
"resourceTags": { "Env": "prod" },
"selectionMode": "PERCENT(20)"
}
}
}
```
### 매 Application-level fault injection
```go
import "github.com/lingo-cn/chaos"
func ChargePayment(ctx context.Context, amt int) error {
if chaos.Active(ctx, "payment.delay") {
time.Sleep(2 * time.Second)
}
if chaos.Active(ctx, "payment.fail") {
return errors.New("chaos: simulated failure")
}
return realCharge(ctx, amt)
}
```
### 매 Steady-state hypothesis (Gremlin)
```yaml
hypothesis:
title: "API latency p99 stays under 500ms"
probes:
- name: api-latency
type: probe
provider:
type: http
url: https://prom/api/v1/query?query=histogram_quantile(0.99, http_latency)
tolerance: { type: probe, value: 500 }
method:
- name: kill-payment-pod
action: chaos-mesh.pod-kill
target: app=payment
rollback:
- name: clear-chaos
action: chaos-mesh.delete
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| 매 starting | 매 staging — 매 pod kill, 매 manual run |
| 매 mature | 매 production — 매 scheduled, blast-radius limited |
| 매 k8s native | 매 Chaos Mesh / Litmus |
| 매 multi-cloud | 매 Gremlin |
| 매 application logic | 매 toxiproxy + feature flag |
**기본값**: 매 staging 의 의 의 시작 → 매 GameDay 의 의 의 production 의 expand.
## 🔗 Graph
- 부모: [[Chaos Engineering]] · [[Site Reliability Engineering]]
- 변형: [[Gremlin]]
- 응용: [[GameDay]] · [[Disaster Recovery]]
- Adjacent: [[Fault Tolerance]] · [[Circuit Breaker]] · [[Retry]]
## 🤖 LLM 활용
**언제**: 매 chaos experiment 의 의 의 design, 매 hypothesis 의 의 formulate, 매 GameDay runbook 의 의 의 작성.
**언제 X**: 매 system 의 의 의 의 of basic monitoring 의 의 의 부족 — 매 chaos 의 의 의 premature.
## ❌ 안티패턴
- **No hypothesis**: 매 random kill 의 의 의 의 — 매 결과 의 의 interpret 의 의 X.
- **No blast radius**: 매 production 의 의 의 의 50% 의 kill — 매 outage 의 의 의 cause.
- **No rollback**: 매 chaos 의 의 의 의 의 stuck — 매 manual recovery.
- **No alerting integration**: 매 chaos 의 의 의 의 alert page — 매 oncall fatigue.
- **One-time**: 매 매 한 번 의 의 의 의 의 — 매 regression 의 의 의 catch X.
## 🧪 검증 / 중복
- Verified — Netflix Tech Blog (2010-2026); *Chaos Engineering* by Casey Rosenthal (O'Reilly); CNCF Chaos Mesh / LitmusChaos docs.
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Chaos Mesh / Litmus / FIS examples + 5 principles |