Practice Exercises for DevOps and SRE Interviews

The best practice for DevOps and SRE interviews combines four kinds of exercise: written troubleshooting drills, practical coding exercises, failures you cause on purpose on your own machine, and broken servers on outside practice sites. Each trains a different part of the interview. Reading question lists trains none of them, because interviews ask you to investigate, write code, and explain decisions under follow-up questions.

The sections below describe each kind of exercise, what it trains, and a weekly routine.

1. Written Troubleshooting Drills

Many troubleshooting rounds are spoken: you say what you would check, and the interviewer tells you the result. A written drill practices exactly that. You read a symptom, choose the next check, read the output you are given, and explain what it shows and what it rules out.

Six drills are worth practicing: a website that is down, errors after a deployment, high CPU on one server, a slow server that is not busy, a failing SSH connection, and HTTP 500 errors at peak traffic. In each one, practice the same method: confirm the problem, scope it, reduce the harm first, then test one hypothesis at a time and say why.

2. Practical Coding Exercises

Coding rounds in these loops are usually practical. Write each of these in Python from a blank file, in under 30 minutes, with a few test inputs of your own:

  • Count status codes and the top three paths in a web server access log, skipping malformed lines.
  • Build a grep style tool that supports a pattern, case-insensitive search, line numbers, counts, and inverted matches.
  • Print the last N lines of a very large file by reading blocks from the end, not the whole file.
  • Count how many requests a rate limiter drops under a fixed window and under a sliding window.

Then add a follow-up change to each, such as a new field order, and notice how much of your code had to change.

3. Failures You Cause on Your Own Machine

Set up a Linux virtual machine, Docker, and kind (a tool that runs a small Kubernetes cluster inside containers). Then break things on purpose and investigate them with the commands an interviewer expects:

Failure to causeCommands to practice
Fill a disk with a large file, then delete it while a process holds it opendf, du, lsof +L1
Stop a service, or bind it only to localhostsystemctl status, ss -tlnp, curl -v
Point the first DNS server at an address that does not answerdig, curl -w, cat /etc/resolv.conf
Give a pod a memory limit below what it useskubectl describe pod, kubectl logs --previous
Reference a Secret key that does not existkubectl get pods, kubectl describe pod

Causing the failure yourself teaches what the evidence looks like before you see it in an interview.

4. Outside Practice Sites

Some companies give candidates a real shell on a broken system. Sites such as SadServers and iximiuz Labs offer broken Linux and container environments prepared by someone else, so you cannot know the cause in advance. SadServers has a free tier. Work through them while explaining each command aloud.

5. Design and Story Practice

Practice two or three infrastructure designs out loud, such as a CI/CD platform for many teams or a metrics and alerting pipeline, with numbers for capacity and a plan for failure. Also write five short stories about incidents and projects you handled, each with a number and what changed afterward.

A Weekly Routine

DayExercise
1Two written troubleshooting drills, explained aloud
2One coding exercise from a blank file, then its follow-up change
3One failure caused on your own machine, investigated with commands
4One outside practice site exercise
5One design question or two incident stories, spoken and timed

Grokking DevOps and SRE Interviews is built around this kind of practice: troubleshooting drills with command output at each step, runnable Python exercises that check their own results, infrastructure design questions, and two full written practice interviews.

Key Points

  • Practice investigating, coding, and explaining, not memorizing question lists.
  • Written drills train spoken troubleshooting, and your own machine trains the commands.
  • Outside practice sites give broken systems you did not prepare yourself.
  • Practice design answers and incident stories aloud, with numbers.
TAGS
Coding Interview
CONTRIBUTOR
Arslan Ahmad
Arslan Ahmad
ex-FAANG engineering manager and author or Grokking series.

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Explore Answers
How does Microsoft make hiring decision?
What Software engineer technical interview questions and answers to prepare?
What is the salary in Splunk Dubai?
What do Dell interns do?
What questions are asked in the Uber interview?
What is a good rank on LeetCode?
Related Courses
New
Grokking Agentic Design Patterns course cover
Grokking Agentic Design Patterns
Design agents that act safely, recover from failure, and justify their cost.
4.9
(561 learners)
Discounted price for Your Region

$98

New
Grokking the AI System Design Interview course cover
Grokking the AI System Design Interview
Learn to design AI systems the way interviewers expect: classic ML products, LLM and RAG architectures, and agentic systems, all through the lens of the system design interview.
4.6
(3,192 learners)
Discounted price for Your Region

$98

Grokking the Coding Interview: Patterns for Coding Questions course cover
Grokking the Coding Interview: Patterns for Coding Questions
The 24 essential patterns behind every coding interview question. Available in Java, Python, JavaScript, C++, C#, and Go. The most comprehensive coding interview course with 543 lessons. A smarter alternative to grinding LeetCode.
4.6
Discounted price for Your Region

$197

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.