How to Prepare for Your Next System Design Interview
Atibhi Agrawal
Posted on April 27, 2021
In software engineering, system design defines the components, modules, interfaces, and data for a system to meet specified requirements. Most companies do not ask system design to freshers. However, when I was interviewing for a Full-Time Software Engineer role, a few companies had system design interview rounds.
In this blog post, I will talk about the various type of system design interviews and how I prepared for them.
What Is a System Design Interview?
Typically system design interviews test candidates on their technical depth and allow them to prove their expertise in the field through real-life application of knowledge.
Some companies test you on HLD or high-level design which have questions like design Facebook or WhatsApp and you are expected to come up with the architecture.
Some ask LLD or low-level design in which you are expected to design modules and classes in a detailed manner. Some commonly asked LLD questions are Design a Parking Lot or Design a Banking Management system.
Another, third type of system design is when the interviewer asks you to design an extension of a project you have already done. Since it does not have a name, let’s name it experience related design or ERD. For example, if you’ve built a library management system for your school, the interviewer might ask you about the design decisions that you made.
Regardless of what type of interview you have HLD, LLD or ERD, the interviewer wants to test your thought process, problem-solving skills and technical knowledge.
Some companies test you on HLD or high-level design which have questions like design Facebook or WhatsApp and you are expected to come up with the architecture.
Some ask LLD or low-level design in which you are expected to design modules and classes in a detailed manner. Some commonly asked LLD questions are Design a Parking Lot or Design a Banking Management system.
Another, third type of system design is when the interviewer asks you to design an extension of a project you have already done. Since it does not have a name, let's name it experience related design or ERD. For example, if you've built a library management system for your school, the interviewer might ask you about the design decisions that you made.
Regardless of what type of interview you have HLD, LLD or ERD, the interviewer wants to test your thought process, problem-solving skills and technical knowledge.
ERD or Experience Related Design
This type of interview is my favourite as it focuses on your past experiences. They ask you questions about your work experience or an extension of a project you have done. Let me walk you through a sample question that I was asked at an interview.
Example Project From My Resume:
Built a timetable management system in Flask. The students and faculty can visualize their timetable, check for clashing courses as well as add their timetable to Google Calendar. Used pytest for unit testing. Travis builds and tests each commit to the GitHub repository. If the tests pass, it pushes the docker image to dockerhub and deploys the application to Heroku. Also setup ELK stack for monitoring and logging.
Questions Related to This:
- Why did you use Flask not Django?
- Did you use a database? Which database?
- You built this for your college, but if you were to have a million new users overnight from various colleges, how would you scale?
- Is there any single point of failure in your project?
- How would you deploy this in real life? Blue-green, rolling or canary deployment? Why?
As you can see, I was not asked to design any large scale system like Facebook or Instagram but they still tested my system design knowledge. It is not necessary that you know the "correct" answers to all the questions but it is expected that you should be able to justify your own design decisions.
How To Prepare for Such Kinds of Interviews
- I have come up with a 4 step plan to prepare for such kinds of interview.
- In addition to this, preparing for High Level System Design interviews(more on it later in the blogpost) and studying the architecture of large scale systems like Google docs, Twitter etc helps.
HLD or High Level System Design
An HLD question aims to give the interviewee a chance to demonstrate their knowledge. There isn't a single correct answer for HLD questions, it is all about discussing the trade-offs and explaining your thought process. I won't go into the details of how to approach a system design question or an interview because there many amazing resources online(which I will list below). I would however like to share my personal 3 step plan for preparing for such types of interviews.
Preparation Strategy
- I read the theory from Grokking The System Design Interview and practised a few questions from the same without looking at the solution.
- I started giving mock interviews on Pramp where you can practice mock interviews for free. This was super helpful for me because I got matched with senior engineers from Zomato, Microsoft, Uber, GoJek, eBay etc who were practising their system design. The way they approached problems taught me a lot. Since I was a New Grad and my system design knowledge mostly came from Grokking, I would request them to explain some new concepts or buzzwords that they used. They were kind enough to explain it and as well provided me with valuable feedback after the interview. After one interview, a senior engineer explained how they used Message Queues in Microsoft. During my interview with a company for a New Grad Software Engineer, I was asked if I could provide examples of where I would use queues, and I told them how it is used in some large companies.
- After each interview, I read up more about the problem that I solved.
- I would also check out the engineering blogs of the company that I was interviewing for. Often, engineers like asking questions related to the work that they do every day.
Resources for HLD
- I have compiled all the system design resources that I referred to and published them on Notion. Check them out here. You can filter them using tags. I have added "Must Do" tags for some resources that are very important.
LLD or Low Level System Design
LLD is about coming up with the class diagrams, methods, the relations between classes, program specifications and other low level details for a given system. In these type of interviews, a candidate is expected to create a modular, flexible and reusable design for software by using Object Oriented Design Principles and Design Patterns. Some popular questions are: Design a Parking Lot, Design a Banking Management System etc.
The only resources I used for LLD are :
- Grokking the Object Oriented Design Interview by Educative.io
- Doing all the design tagged questions on Leetcode.
Conclusion
I hope this blog post helps you in your interview preparation! Good luck with your interviews. 😃
Feel free to comment if you need further guidance or DM me on Twitter. You can also reach me at atibhi.a@gmail.com 😄
Resources
Posted on April 27, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.