Incident Simulation Labs
- Read How To Use This Pack, then time-box yourself
- Read only the Alert of Incident 1 and decide what you'd check first
- Compare with "What You Should Check" and "What You're Expected To Discover"
- Repeat for Incidents 2โ4 before trying the hands-on 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