How to ace system design interview – Complete guide
With the continuous advancement in technologies with each passing day. Software and applications are getting more and more complicated. And because of the increasing complications, big tech companies are hiring system design professionals to design better and more efficient systems for them.
System design as a field is both complicated and competitive, and in this article, we will help you to get out of this competition with flying colors.
But before the main content, let’s be clear with all the basic definitions related to this field.
What is a System
A System is a collection of architectures or technologies that are connected, communicate together, and work together to serve a set of users to fulfill their requirements.
A System is made up of different building blocks called components. These components interact with each other. Different components of a system serve different requirements.
Some examples of systems in real life are hospitals, schools, hotels, etc. Some examples of systems in the digital world are Instagram, WhatsApp, Facebook, etc.
What is Design
A design defines what are the appropriate components to use. It provides you with the steps that define how each component communicates with one another and how the whole system works together as a whole. How the needs of the user are served is defined by designs. Systems that are made of the same components can also have different designs depending on the use case. For example, although the components of a bungalow and a flat are the same, they have very different designs.
What is System Design
System design, combining the two definitions provided above, is the process of designing architectures and components for a system to fulfill the set of requirements of the users.
A well-designed system has the following features:
- The system is easy to scale
- The server should have a low downtime, i.e. any request sent to the server should not fail
- The latency between request and response should be as low as possible
- The system should have a proper backup of multiple copies of the server. So the data is safe in case of any failure
- The system allows sync across different servers for data consistency
- The components of the system should be reusable
- All the components of a system must work together as a single, big unit
- Best efficiency should be ensured between all the different components of the system
Important System Design Tips
- Requirement collection: When the interviewer states a problem. You need to list down all the requirements you need to design that system. For this part of the interview do not assume everything of your own. Communicate with the interviewer to list down the requirements needed for that particular design
- Object-oriented design: Your designed system must follow an object-oriented approach i.e. creating designs that involve objects, classes, and relationships between them. As most of the languages used in the industry follow the OOP, your design must follow the same.
- Identifying design patterns: There are more than 20 design patterns in use but out of them you need to identify the one required for your given problem. While selecting the appropriate design pattern, keep in mind a few points: what is the intent of the design pattern? In which conditions they are used? How are different design patterns interlinked and different from each other?
- Tackle concurrency: Concurrency is a method of handling multiple computations at the same time. Your design should mention having proper pathways and tools to handle concurrency. It makes your design more efficient and robust.
- Network protocols: Do not just make lines between different components of a system. You should also know how each component communicates with the other. What are the network protocols used, why you used them, and what are the other alternatives?
- Top-down and bottom-up design: Top-down design is the process of designing the whole system first and then moving on to building it. The bottom-down design includes creating a system on a component-by-component basis, switching between creating and designing iteratively. Choose the appropriate approach to design the system and convey it to the interviewer
- Actors and objects in the system: Actors are computational units outside the system that interacts with it. An object is a self-contained component that has different functions and uses and makes the data useful. While creating your design it is important to find the correct actors and objects to operate with.
Tips for the Interview
Now that you are aware of all the basic definitions of system design, let’s dive deep into how to ace the interview. Here is a list of tips that you can keep in mind and follow in your next system design interview to ace it with flying colors.
Details later: Do not rush to the details prematurely, i.e. giving too much detail very early. First, provide a basic design overview and a rough sketch of all the components and all the connections of the system, and then slowly go into details of each part
Pause and talk: You should not be the only one talking all the time throughout the interview. While you are explaining your design, take pauses, let the interviewer give you some feedback and then take the conversation in the direction he wants
Design Architecture: If you have a certain architecture in mind, do not fear to use it as long as you know the pros and cons of it and can give proper reasons for choosing it. But still, be flexible. Do not fit your requirements into an architecture, fit the architecture into the requirements, i.e. do not have a fixed architecture in mind that you memorized before your interview. Be flexible as each system has a different design and a different workflow
Be familiar with your requirement choices: Be sure about every little thing that comes out of your mouth. If you are using any API or any software only specify the name when you know the reason why you are explicitly using that particular technology or that particular product. Also, you should be aware of why you avoided other alternatives.
Design technologies: Be aware of all the technologies that are being used for all the different kinds of components in your system. What technologies you are using, what are the alternatives and why you chose a particular one?
Don’t learn everything: Don’t try to learn every technology out there, when you are starting to prepare for the interview. There are thousands of technologies already out there and thousands more are being built every single day. Just start with what you know and build upon it by filling in the gaps. Focus on your stuff and know it well
Break down your design: Figure out the basic components of the design. Create a broad picture of it and then engage with the interviewer to see where they want you to go deep and follow through.
Mock interviews with you: Practice several mock interviews before you go on to the main battle. You can try being your interviewer and designing questions for you. This will not only allow you to excel in your interviews but also make you aware of how an interviewer thinks. Which can be a big plus.
Mock interviews with others: You can also ask your friends or colleagues to interview you. If both of you are preparing for the same thing, then you can interview each other and it can be a fun activity
Play with your strengths: Try to stir the conversation into the topic you are more confident in, and try to discuss it more. Designing a system is very complex and detailed stuff and is not done by just one person. The interviewer knows this and so doesn’t require you to be the master of all fields. So it is your job to communicate your strong points and try to speak and discuss the field you are more comfortable in.
It’s not the end: Always keep in mind that it is not the end. As for the system designer’s role, the recruitment process will not have just one interview round. There will be other technical rounds in which you can take the lead if you mess up on your interview round. So keep calm and do your best
Recommended Resources
Tips and all are necessary but you need good and reliable resources to prepare for the big day. So here is a curated list of some of our recommended books, courses, YouTube channels, etc
Books
- System design interview by Alex Xu
- Designing Data-Intensive applications by Martin Kleppman
- System Analysis and Design by Dennis, Wixom, and Roth
- Cracking the Coding Interview by Gayle Mcdowell
Online resources
Youtube Channels
Conclusion
In this article, we covered system design interviews from very basic definitions to detailed design-specific points to keep in mind and provided various resources you can use to prepare for your next interview. Hope this article helps you ace your next system design interview.
All the best!
Happy coding;)
Sharing is caring
Did you like what Shivam Pande wrote? Thank them for their work by sharing it on social media.
No comments so far
Curious about this topic? Continue your journey with these coding courses: