10 DevOps Interview Questions to Gauge a Candidate’s Real Knowledge
Interviewing DevOps candidates can be challenging in a field that's still defining itself and evolving. What in the world should you ask a potential hire?
Join the DZone community and get the full member experience.Join For Free
devops is not a new term in the it world — it has been around for almost ten years. interestingly enough, as old as the field is, devops is still defining itself.
the ever-evolving definition of devops is also challenging from an hr perspective, and devops managers are increasingly dealing with the challenge of defining devops roles within their organizations and finding devops talent.
in this post, i’ve put together a list of ten questions that can be used as a point of reference when interviewing devops engineers. if you’re a candidate, this list will also help you to prepare for interviews. here is a quick list followed by a more in-depth explanation and follow-up questions for each one.
(note: at logz.io, the focus of the devops team is on ci/cd, production operations, and performance investigation and troubleshooting — some companies may have a slightly different focus, so keep that fact in mind.)
some common questions in devops interviews
what have you been doing over the last one to two years?
interviews do not have to adhere to a specific framework and can be dynamic in nature. to get a general perspective on what a candidate has done, it’s a good idea to start an interview with a general query into the engineer’s recent professional activities.
this will help you, a devops manager, to understand what specific tools and technologies the engineer has been working over the past few years (these can include git, puppet, jenkins, docker, ansible, and scripting languages). also, it will reveal the candidate’s ability to work in a team, as the candidate will most likely divulge whether he or she flew solo or was part of a bigger outfit. if the person’s answer does not include this information, then that is another must-ask question.
it is critical to take note of the roles in which the candidate has served and the tasks that the candidate has performed, even if they are not strictly required in your organization or in the role for which he or she is interviewing. if the prospect does not mention the exact tools that you currently use, follow up with questions about those tools and tasks to get a good feel for his or her ability to assimilate knowledge as well as his or her general operating dependencies. good candidates will always demonstrate a deep understanding in the field of their operation while others will reply with superficial answers to drill-down follow-up questions.
2. how do you deploy software?
this question is critical for any devops position. as more and more devops teams move towards automating and adopting continuous delivery best practices, it is critical to gauge whether the candidate is comfortable talking about code deployment and whether he or she understands how all of the available continuous integration tools and devops tools fit together. if you have a drawing board available, let him or her build a diagram for you.
depending on the answers that you get, you can develop further lines of questioning dynamically. for example: “do you have a database in the stack?” “how do you update the schema?” “what tests do you run, and how do you run them?” “if all tests pass, how is the code deployed into production?” “how do you make sure that you do not lose traffic during deployment?”
3. how have you handled failed deployments?
failed deployments, of course, are an all-too-common occurrence when deploying code. devops engineers need to be extremely hands-on — they need to know when something has gone wrong and then troubleshoot the issue as quickly as possible.
a good way of assessing the suitability of a candidate is to ask them to tell the story of a failed deployment and how it was handled. specific, follow-up questions can include: “how do you know there was a deployment failure?” “do you roll back automatically?” “what criteria do you use?”
4. if something breaks in production, how do you know about it?
monitoring is a huge component of devops work (and this is reflected by the multitude of monitoring tools and platform out there). regardless of the specific tools that you use and the monitoring system that you employ in your company, you need to know how well-versed the candidate is in planning and executing a monitoring strategy.
again, you could use the storytelling tactic: “tell me about a crisis in production that you had, how you became aware of it, and how it was solved.” a good war story is always enlightening — it will help you to assess not only how skilled the candidates are in monitoring but also how they handle crises (assuming that they tell the truth, of course).
other leading questions: “what monitoring tools do you work with?” “did you choose them? if so, why?” “how do you get alerted?” i have found that the best candidates will have plenty to share about their monitoring expertise and specifically about advanced user-experience monitoring techniques.
5. what happens when you type “mv *” in a directory with three subdirectories a, b and c?
of course, this question — and the responses — can vary, but the idea is to gauge the technical expertise of the engineer in a linux environment, which is a “must” in almost all devops positions.
it’s a good idea to change the bash command as you receive the answers. if you feel the questions are too easy, try raising the bar with more advanced bash questions. for example, “what is the difference between ‘cmd1 ; cmd2’ and ‘cmd1 && cmd2’?”
you might want to prepare a quiz sheet with a list of five to ten commands. this way, the candidate will find it easier to answer.
6. without using docker, can you see the processes running inside a container from the outside?
ok, we cheated here. not every company is using docker or even containers at all, so this question is a bit technology-specific. based on our expertise and on the data in the 2016 devops pulse survey that we recently released, more and more companies are moving to microservices and containerized architectures. so, we added this question to the list.
of course, this question is meant to figure out whether the candidate understands how containerization works. instead of asking “how do containers work?” or “what is a docker image?”, the answer to the question above will inform you whether the person gets it. other questions may include “how does container linking work?” or “how and why would you optimize a dockerfile?”
7. describe the linux boot process.
this is another question meant to gauge the candidate’s system understanding and linux expertise.
a good candidate will be able to detail the correct order and significance of at least some of the various stages (i.e., bios, mbr, bootloader, kernel, initialization, and runlevel). to drill down further, i’d recommend a follow-up question such as, “what information needs to be provided to the bootloader?”
8. how does ‘traceroute’ work?
any devops interview has to include networking questions.
many candidates will not know the answer to this question while others will offer only a partial answer. a good way to separate the devops wheat from the chaff is to see if the candidate only explains that the command prints the route that packets take to the network host or if he or she also delves into the “how.”
even if you do not receive a correct and complete answer, this question is a good starting point for a deeper conversation in which you can brainstorm with the candidate. in this process, you can try to come up with valid possibilities and discount invalid ones based on a solid understanding of ip routing.
another example of a good networking question that i often use: “what is the difference between trying to connect to a port that is not being listened to as opposed to one that is firewalled in terms of tcp?”
9. do you consider seven to be a high load average?
logz.io is an ai-powered log analysis platform that offers the open source elk stack as a cloud service, so we do our healthy share of performance testing and tuning. we need our devops engineers to understand the fundamentals of system performance monitoring for both planning purposes and troubleshooting issues in production.
this question enables you to learn whether the candidate understands the meaning of load average in the first place. if they understand and explain that it is not cpu usage, it is a great opening for a deeper discussion on troubleshooting performance.
useful follow-ups: “is it possible to observe high load with low cpu usage? if so, what may be the reasons? how would you check?”
10. do a fizzbuzz coding test.
the main idea of the fizzbuzz test is to see how a developer handles an easy coding task. live simulations are a good way to see how quick engineers are on their feet as well as how they grasp a simple task and then translates it into code.
the candidate should:
write a program or script that prints out the numbers between 1 and 100. for each number that is divisible by three, “fizz” is printed. for each number that is divisible by five, “buzz” is printed. for each number that is divisible by both three and five, “fizzbuzz” is printed. most good developers should be able to write such a program on paper within a couple of minutes. see how they write the code, ask them why they wrote specific parts in certain ways, and then check the validity of the code.
as i implied in the introduction, the questions in a devops interview will vary from organization to organization. different companies use different technologies and will look for different expertise and skill sets. also, these questions will vary based on the amount of experience you specifically need. still, the list above contains questions that i have found to be relevant to any devops engineer position.
i have conducted many, many devops engineers interviews, and each one has been different. though i always start with the same set of questions, i quickly find myself veering off into unexpected ones. after all, a good interview is dynamic and adapts to the specific candidate’s answers and technical expertise.
what questions do you ask in devops interviews? what questions have you been asked? i invite you to comment below.
Published at DZone with permission of Emanuel Peri, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.