Incident Simulation Labs
How To Use This Pack
For each incident:
- Read only the Alert.
- Start a 30-minute timer.
- Investigate.
- Identify:
- Symptom
- Root cause
- Immediate mitigation
- Long-term fix
- Write a 5-minute postmortem.
Table of Contents
- API Latency Spiking
- Server Down — But Ping Works
- Disk 100% — But df Shows Free Space
- High Load But Low CPU
- Out Of Memory Kill
- Connections Timing Out Randomly
- Container Is Slow But Host Is Fine
- DNS Is Broken
- Too Many Open Files
- System Won't Boot Properly
- Bonus: The Full Chaos Day
- Additional Hands-On Labs
Every drill in this pack follows the same shape: one alert starts a 30-minute clock, you fan out to pin down the symptom, root cause, immediate mitigation, and long-term fix, then converge everything into a short postmortem before moving to the next drill.
🧨 INCIDENT 1 — "API Latency Spiking"
🚨 Alert
Latency p95 jumped from 40ms → 3s. CPU at 95%. Users reporting slowness.
🖥 Setup (Cause It)
yes > /dev/null &
yes > /dev/null &
yes > /dev/null &
🔎 What You Should Check
topuptimempstatpidstatps aux --sort=-%cpu
🧠 What You're Expected To Discover
- CPU saturation
- Run queue backlog
- Possibly a noisy neighbor process
🎯 Skills Tested
- Load average understanding
- User vs system CPU
- Process prioritization (
nice,renice) - Killing safely
🧨 INCIDENT 2 — "Server Down — But Ping Works"
🚨 Alert
App is unreachable. Ping works. Port 443 times out.
🖥 Setup
systemctl stop nginx
Or simulate a firewall block:
iptables -A INPUT -p tcp --dport 443 -j DROP
🔎 Investigate With
ss -tulpnsystemctl statusjournalctl -xeiptables -Ltcpdump -i any port 443
🧠 Expected Discovery
Service not listening, OR firewall silently dropping packets.
🎯 Skills Tested
- Port binding
- Packet visibility
- Service dependency awareness
🧨 INCIDENT 3 — "Disk 100% — But df Shows Free Space"
🚨 Alert
App cannot write logs. Error: "No space left on device". df -h shows 40% free.
🖥 Setup
Open and delete a file while still writing:
tail -f /var/log/syslog > bigfile.log &
rm bigfile.log
🔎 Investigate
df -hlsof | grep deleted/proc/<pid>/fd
🧠 Expected Discovery
A deleted file is still held open by a process.
🎯 Skills Tested
- File descriptor leaks
- Linux inode behavior
- Disk debugging beyond
df
🧨 INCIDENT 4 — "High Load But Low CPU"
🚨 Alert
Load average = 15. CPU usage only 20%.
🖥 Setup
Simulate disk wait:
dd if=/dev/zero of=bigfile bs=1M count=5000 oflag=dsync
🔎 Investigate
vmstat 1iostat -xtop(check iowait)pidstat -d
🧠 Expected Discovery
High I/O wait. Processes stuck in uninterruptible sleep (D state).
🎯 Skills Tested
- Load average meaning
- iowait analysis
- Disk bottleneck detection
🧨 INCIDENT 5 — "Out Of Memory Kill"
🚨 Alert
App randomly restarting. Kernel logs show crash.
🖥 Setup
stress --vm 2 --vm-bytes 2G
🔎 Investigate
dmesgjournalctl/proc/meminfofree -m
🧠 Expected Discovery
OOM Killer terminated the process.
🎯 Skills Tested
- Memory pressure detection
- OOM log reading
- Swap analysis
- Overcommit behavior
🧨 INCIDENT 6 — "Connections Timing Out Randomly"
🚨 Alert
Intermittent 502 errors. Connections hang 30 seconds.
🖥 Setup
Simulate SYN backlog exhaustion:
hping3 -S -p 80 --flood <server_ip>
Or open many connections:
for i in {1..10000}; do nc <server_ip> 80 & done
🔎 Investigate
ss -snetstat -an | grep SYNtcpdump/proc/sys/net/ipv4/tcp_max_syn_backlog
🧠 Expected Discovery
Connection queue saturation.
🎯 Skills Tested
- TCP handshake knowledge
- Backlog tuning
- SYN flood basics
🧨 INCIDENT 7 — "Container Is Slow But Host Is Fine"
🚨 Alert
Container CPU 100%. Host CPU 40%.
🖥 Setup
Limit container CPU:
docker run --cpus=0.5 nginx
🔎 Investigate
docker statsdocker inspectcat /sys/fs/cgroup/*
🧠 Expected Discovery
cgroup CPU throttling.
🎯 Skills Tested
- cgroups
- Resource isolation
- Container vs host debugging
🧨 INCIDENT 8 — "DNS Is Broken"
🚨 Alert
Service cannot reach the database by hostname. IP works fine.
🖥 Setup
Break /etc/resolv.conf.
🔎 Investigate
dignslookupcat /etc/resolv.confstrace curl example.com
🧠 Expected Discovery
DNS resolution misconfiguration.
🧨 INCIDENT 9 — "Too Many Open Files"
🚨 Alert
Error: "Too many open files"
🖥 Setup
ulimit -n 50
Then run a connection-heavy app.
🔎 Investigate
ulimit -a/proc/<pid>/limitslsof/etc/security/limits.conf
🧠 Expected Discovery
File descriptor exhaustion.
🧨 INCIDENT 10 — "System Won't Boot Properly"
🚨 Alert
Instance stuck in emergency mode.
Causes To Simulate
- Corrupt
/etc/fstab - Fill root disk
- Remove a critical system file (VM only)
🔎 Investigate
- Single-user mode
journalctl -xbmount -a
🎯 Skills Tested
- Boot process knowledge
- Recovery under pressure
🔥 Bonus: The "Full Chaos Day"
Simultaneously:
- Fill disk
- Create CPU stress
- Break DNS
- Limit file descriptors
Then debug under time pressure.
🧪 Additional Hands-On Labs
These labs mirror the incidents above but are structured as discrete practice exercises — run each on a disposable VM (EC2, local VM, or WSL) in order to build intuition.
Lab 1 — Find the CPU Killer
Goal: Identify which process is consuming CPU and why.
yes > /dev/null &
yes > /dev/null &
yes > /dev/null &
Tasks: find top CPU process → identify PID/parent → reduce impact without killing immediately → stop it safely.
top
ps aux --sort=-%cpu | head
pstree -p
renice 10 -p <PID>
kill -15 <PID>
💡 SRE Insight: High CPU ≠ crash. First contain impact, then fix.
Lab 2 — Memory Leak Simulation
Goal: Detect abnormal memory consumption.
python3 -c "a=[]; [a.append('A'*10**6) for _ in range(5000)]"
top
ps aux --sort=-%mem | head
cat /proc/<PID>/status | grep Vm
💡 SRE Insight: Always confirm memory usage from /proc, not just top.
Lab 3 — File Descriptor Leak
Goal: Detect "Too many open files" condition.
while true; do cat /dev/null > tempfile_$RANDOM; done
pgrep -fl cat
ls /proc/<PID>/fd | wc -l
cat /proc/<PID>/limits
💡 SRE Insight: FD exhaustion is a very common production outage cause.
Lab 4 — Zombie Process Investigation
Goal: Identify zombie processes and their parent.
bash -c 'sleep 1 & exit'
ps aux | grep Z
pstree -p
💡 SRE Insight: You fix zombies by fixing the parent, not the zombie.
Lab 5 — Unkillable Process (I/O Wait)
Goal: Understand why some processes won't die.
dd if=/dev/zero of=bigfile bs=1M count=5000
ps -o pid,state,cmd -p <PID>
kill -15 <PID>
kill -9 <PID>
💡 SRE Insight: State D → waiting on kernel I/O → not killable.
Lab 6 — Full Production Debug Simulation
Scenario: "Service is slow, CPU low, users complaining."
pgrep -fl service
top -p <PID>
cat /proc/<PID>/status
ls /proc/<PID>/fd | wc -l
cat /proc/<PID>/limits
pstree -p <PID>
What the interviewer wants: you systematically rule out CPU, memory, FD exhaustion, process tree issues, and resource limits — in that order.
🧠 What Senior SREs Do Differently
They:
- Check saturation first
- Look at queues
- Validate assumptions with data
- Avoid random restarts
- Think in bottlenecks
🏁 If You Can Confidently Solve All 10
You are operating at:
- Strong mid-level SRE
- Possibly senior, depending on speed and clarity
Summary
- 💡 Always read only the alert first — resist the urge to peek at the "expected discovery" before investigating.
- 🔥 Time-box each incident to 30 minutes to simulate real production pressure.
- ⚠️ The same symptom (e.g., "slow, CPU low") can map to I/O wait, FD exhaustion, or dependency latency — verify with evidence, don't assume.
- ✅ Always write the 5-minute postmortem — it's where the actual learning compounds.
See Also
- Incident Response Mindset — the thought process to apply while running these labs
- Process Management & /proc — command reference for zombie/FD/CPU labs
- Filesystem & Storage Playbook — deep dive for the disk-full and inode incidents
- DevOps/SRE Interview Scenarios — interview-style versions of these same incidents