Incident Response for DevOps: How to Fix What Breaks
By Branko Petric - Updated - About 2 weeks at 10 hours a week
The short answer
For a first DevOps job, you need a repeatable way to debug a broken system. Check the scope, recent changes, logs and metrics. Then form one hypothesis, choose rollback or fix, and write a blameless postmortem. You can skip incident-commander training and chaos platforms. Plan on about 2 weeks at 10 hours a week.
Why incident response comes after monitoring and security
You need evidence to debug an outage. Step 10 gave you the dashboards and alerts. Step 11 showed you what a leaked key looks like and what to do about it. This step turns those pieces into one habit you can use under pressure.
It also comes before Kubernetes on purpose. Your app still runs on a setup you built yourself, so you know every part that can fail. That makes it easier to practice the method before adding more layers.
What to learn, in order
- Scope the problem. Ask who is affected, what they see, and when it started. A failure for one user and a failure for everyone point to very different causes.
- Check recent changes first. Look at the last deploy, the last Terraform apply, and
git log. Many incidents follow a change, and this check takes a minute. - Follow a request through the system. Go from DNS to the load balancer to Nginx, the app and the database.
curl -vshows you how far a request gets. - Read logs and metrics together. Metrics tell you when something changed. Logs often tell you why.
- Test one hypothesis at a time. Write down what you think is wrong and what would prove it. If you change three things at once, you will not know which one helped.
- Stop the harm before you find the root cause. Mitigation (a quick step that reduces the damage) comes first. A rollback (going back to the last working version) is the common example. Know how to do yours from step 7.
- Communicate. Post short updates with what you know, what you are trying, and when you will update next. Keep a timeline as you go, because you will need it later.
- Write the postmortem. A postmortem is a written record of what happened and what will change. Google's SRE book explains the blameless approach. Its workbook chapter adds more on how to do it well.
What to skip for now
- Setting up on-call tools. On-call means being the person who answers alerts during set hours. You can learn the paging tool on the job.
- Chaos engineering platforms, which inject failures automatically. Breaking your small app by hand teaches the same lesson at this stage.
- Incident commander training, which teaches how to lead a large response across many teams.
Common mistakes
- Restarting everything first. A restart may bring the service back, but it can also wipe the evidence. Save the logs first, unless users are being harmed and the restart is the fastest safe fix.
- Debugging while users wait. If the last deploy is the likely cause, roll back first. Finding the bug can wait until the site is back.
- Trusting the first theory. "It must be the database" feels convincing until you look. Find evidence that could prove your theory wrong.
- Writing "be more careful" as an action. It changes nothing. Write something you can check later, such as "add a test that blocks this config from merging".
- Naming a person as the cause. Ask why the system let one mistake reach users. That question leads to a fix.
Your project
Ask a friend, or write a script, to break your app three ways with no hints. Good failures include a wrong database password, a full disk, and a firewall rule that blocks a port. Time each fix and keep your notes. Write a postmortem for each failure and put them in your Git repo. Two of them will go into your portfolio.
You are done when
You can do all of this with no notes. If you already can, skip this step.
- Someone breaks your app without telling you how. You write down who is affected and when it started before you change anything.
- You find the cause of three different failures using only
journalctlordocker logs,curl -v,git logand your dashboards. - After a bad deploy, you choose rollback or fix forward, say why in two sentences, and carry out your choice.
- You write a postmortem with a timeline, the impact, the contributing causes, and at least two actions that each have an owner. It blames no person.
Learn it and test it
Free guides
- Linux Logging: journald, syslog, and Log Files
- Linux Performance Monitoring and Troubleshooting
- Monitoring and Logging with CloudWatch
Practice scenarios
- 502 Bad Gateway Right After a Deploy
The site returns 502 from nginx after a deploy. A teammate wants to tweak the nginx config. Defend where you actually look first.
- 3 AM Outage: Roll Back or Fix Forward?
A deploy 20 minutes ago correlates with a spike in 500s. You are on call. Defend whether to roll back or fix forward.
- After an Outage, Mandate Manual Approval on Every Deploy?
After a bad deploy caused an outage, leadership wants a mandatory human sign-off on every production release. Defend a better way to prevent the next one.
Common questions
How do I learn troubleshooting without production experience?
Break your own system on purpose, or better, ask a friend or a script to break it without telling you how. The project on this page does that. Your system is small, but the method is the same one you would use at work: scope, changes, evidence, hypothesis.
What is a blameless postmortem?
It is a written record of an incident, its impact, and what was done about it. Google's SRE book says it should focus on contributing causes without blaming a person or team. People report problems more honestly when they are not afraid of being blamed.
Should I roll back or fix forward?
Roll back when a recent deploy is the likely cause and rolling back is safe, because that usually ends the harm fastest. Fix forward when rollback cannot undo the damage, such as after some database changes, or when the fix is small and already understood. Be ready to say which facts drove your choice.
Practice defending your decisions
DevOps Ledger is a scenario-based DevOps and SRE interview practice platform: you pick a real production incident, defend your decision in a chat against a senior-engineer AI that pushes back, and get scored against an answer key written before you started.
One payment. 12 months of access. No subscription, nothing renews.
Get full access - $19