System design is a critical tech interview for many different roles - from software engineers (SWE) to technical program managers (TPM) to engineering managers (EMs) and even product managers. If you’re interviewing for a technical role, you’re bound to come across this round at virtually all FAANG companies and many startups. You may be intimidated given the ambiguous nature of the questions, which vary from company to company - but the general format is predictable. Your hiring manager will be investigating and evaluating the way you go about solving technical problems. They will look at your logical decision-making in the face of uncertainty, your confidence in tackling risks, your capacity to pivot in light of new information, and many other factors.
As we mentioned, we wouldn't blame you for feeling intimidating before coming into a system design interview. It’s helpful to remember that the purpose of the system design interview is to observe your thought process, and there are no real “wrong answers.” We wrote this handy guide to help you ace questions like these, that we’ve seen frequently asked at tech companies:
- Design Tiktok. Watch a Google TPM give his answer.
- Design a ride-sharing service.
- Design a relational calendar app. Watch an incoming Amazon SWE answer this question.
- Design a web crawler.
- Design a typehead box for a search engine. Watch an SWE at Modern Health give his answer.
So, let's get to it!
What is System Design?
System design in this context means defining the architecture, product design, modules, interfaces, and data for a system according to given requirements. The purpose of system design is to architect a system that can effectively support the functionality of a product or service. A system can be designed well across multiple dimensions in system design. These dimensions are:
- Scalability: a solid system must be designed to be scalable. This means that it can handle the additional load and will still operate with efficiency while doing so.
- Reliability: Systems must also be designed to be reliable. Meaning they perform the way they are supposed to. Systems need to handle user mistakes while performing according to the specified requirements. Reliability also means that unauthorized access to the system can be thwarted.
- Availability: this is the term used to describe whether or not a system can perform its intended function. Availability can be measured in time (its uptime, for example). The availability of a system is related to its reliability but, make no mistake, it is not the same thing. However, if a system is reliable, it is also available, not but necessarily vice versa.
- Efficiency: a well-designed system is an efficient system. Efficiency simply means the system performs its functions quickly and reliably. Efficiency is measured with metrics like latency, response time, and bandwidth.
- Maintainability: Finally, a well-designed system must also be easy to maintain over time. This means that the system must also be designed with new engineers in mind. It must be simple enough for them to understand quickly and modify in unanticipated ways if need be.
During your system design interview, you will be asked a variety of questions. The exact nature of the question is nearly impossible to predict. However, when answering any of them, you should always keep these five principles in the back of your mind. The best system design answer will account for each, so be sure to flesh out the points on how you can design your system along these dimensions.
The System Design Toolbox
There are numerous components, algorithms, and architectures that you can use to best design your proposed systems. All components, algorithms, and architectures might be incredibly effective at actualizing one of the previously mentioned dimensions of system design. However, they may do so at the expense of others. You’ll need to learn how to juggle and decide between the different elements in your system design toolbox. Unfortunately, each will come with its own unique set of trade-offs and strengths.
In the end, this is precisely why system design interviews are so interesting for hiring managers. When they ask you to design some system according to a particular set of parameters, they are studying the design choices you make and why. This means that, while you are answering your interview questions, you should always fully explain your thought process and approach. Carefully illustrate why the design choices you made are best given the requirements of the system.
System Design Interview Questions
Now that we've looked at what system design is, let's look at some sample system design questions. These are real questions, asked during real interviews. Of course you shouldn’t simply copy our answers here - any competent hiring manager will be able to spot a formulaic response from a mile away. However, these samples could help you deduce the best way to go about answering these questions.
"How would you design a large-scale, geo-distributed video-sharing platform such as YouTube?"
Note that such a question is not expecting a truly complete answer. Youtube today is obviously an incredibly complex system. Keep it simple. These system design questions are ultimately looking to see if you can:
- Pull together a small set of requirements from an ambiguous question.
- Define a minimum viable product (MVP) according to these basic requirements.
- Produce a high-level architecture with all the numerous components that are necessary to implement your design.
- Discuss the tradeoffs between components and algorithms, and explain your choices.
- Provide an additional level of detail on any given component or design decision depending on where your interviewer wants to deep-dive.
- First, clarify the requirements with your interviewer (a common and recommended first step for any system design question). From there, you need to decide which of these are most important and should take priority in your design.
- Next, outline your problem space to some well-established or familiar architectures that are appropriate for the requirements. For instance, many system design questions (such as this one) can be outlined using a client-server pattern. This means that the design includes a user-facing client, middle-tier services alongside a database. iOS apps, on the other hand, would be better served with an MVC pattern (model-view-controller).
- Now, you will need to structure your answer with an outline of the high-level components that will make up the architecture pattern you’ve chosen. From there, elaborate and expand on each of the components, making sure to describe how they’re connected and how they communicate with each other. It’s helpful to start with the component closest to the user and move backward from there. This will help show your hiring manager that your design process and deliver is methodical and user-centric
- Always be sure to explain each of your design decisions as you answer the question, and check in frequently with your interviewer. Communication is being tested as well; don’t be afraid to engage.
"Let's pretend that you are the lead engineer tasked with building a platform like Reddit from scratch.”
Assume you’re given the following requirements:
- Users can make posts in different forums (subreddits),
- Users can include images in their posts,
- Users can upvote or downvote posts they like or dislike,
- Users can leave comments on posts,
- The system has a news feed of posts sorted by both ranking and recency of posts.
The question would come with the following constraint:
- The system must be able to support large volumes of users viewing and posting content simultaneously.
There's no denying, this is a broad system design question. We will follow a similar approach as we did for the previous question.
First, we will define the problem space. This, again, means clarifying the requirements. In this sample question, the interviewer gave you a concrete list of necessary features. Still, you should first dig deeper into the requirements for additional clarification and detail. For instance, you can ask questions like:
- Does our system need to support users on mobile and the web, or just one or the other?
- Will the images be uploaded to the system itself, or will they be links to another hosting service?
- Are there any necessary performance-related features that would influence our system design?
Let's imagine your interviewer stated you only need to be concerned with web users. We also want the images to be uploaded directly to our system and need all the system's content to load as quickly as possible for all users, no matter where they may be located.
Next, we will outline the high-level design. Now, we need to choose a few primary components of our Reddit system. Based on what we know about the feature requirements, we know these components will need to allow users to view, post, rank, and comment on other posts. Important components include databases, user interfaces, servers, and more. For this question, we’ll begin with the database and move from there. The database will need to store all the user data regarding posts, upvotes/downvotes, and the uploaded images. In this particular case, a relational database is the most appropriate choice. This is because of the relational nature of our data (one user will have several posts, which, themselves, will contain many upvotes/downvotes, and comments). As such, it would make the most sense to use a SQL database because of its natural efficiency with relational data and simplicity.
From here, we need to define the application servers that we will use for our system. These servers will need to handle the system data, authenticate users, along with many other operations. Because our interviewer mentioned our system needs to work at massive scales, we will need to use many server instances. As a result, a load balancer should be implemented, as well, to manage the traffic across the server instances.
Finally, we will define each part of our system. Once outlined, we can define each part of our system in greater detail. It is here where we elaborate on our design decisions and the tradeoffs that come alongside them. Unfortunately, you may not have the time to dig deep into every single aspect of your system. Nevertheless, you should be capable of diving deep into any of them, if necessary.
Helpful Things to Remember
- In the end, there are no set answers in system design interviews. The hiring manager is not waiting for one specific correct answer to their questions. They are concerned with your thought and design process, so be sure you flesh out why you are making your design decisions along with their tradeoffs.
- You will need diverse knowledge and comfortability with many different technologies and systems to answer these questions most effectively. Engineers, for example, will need to elaborate deeply on the systems within their areas of expertise. However, management roles, such as TPM, need to have a much broader range of knowledge over the systems and technologies they use.
Keys for Success
- Don't forget to clearly define the who and the what of your solution early on when clarifying requirements. Clearly explain the nature of the problem and who the solution would be serving, and refer back to this frequently as you build your system. Doing so will help give context to the various tradeoffs of your design decisions.
- During your system design interview, it's important to ask clarifying questions. You wouldn’t design an implement a whole system without plenty of back-and-forth communication in the real world (we hope), so don’t do it here. When you're answering these kinds of questions, you are letting the interviewer know how you can work together to solve a specific problem.
- A solid key to a successful answer is always preemptively answering the "whys?" that come alongside each design decision. Clearly explain why the design decisions you make are appropriate for the given problem.
Pitfalls to Avoid
- Despite what we just mentioned, it may feel unnecessary during your interview, to carefully explain why you make the decisions you do. This can be especially true if the answers seem obvious, but make no mistake, your interviewer is highly invested in your thought and decision process. Explaining the obvious is a critical piece of that.
- Don't feel like you cannot rely on or borrow from the design architectures that you are most comfortable or experienced with. So long as you can substantively explain why it is the best architecture for the required system. This doesn't mean you should try to fit every potential system design into the same architecture pattern, as there is no one size fits all in that regard.
- You may feel compelled to simply ask your hiring manager or interviewer what they think are the best options or design decisions. Ultimately, this can only hurt you, as they are not interested in what they think is the best. They're investigating what you think is the best way to design a system.
Nail the System Design Interview with Exponent
We know more than anyone that the system design interview can be challenging. You will undoubtedly need to review and practice your skills before the big day, and there's no better way to do that than with Exponent. We have several company-specific interview guides, interview prep courses, and interview coaching that can help you ace the system design interview. Not only that, you can join our vibrant community of tech insiders and like-minded job seekers. So what are you waiting for? Sign up with Exponent today!
👯♂️ Practice your behavioral and system design skills with our interview practice tool.
👨🎓 Sign-up for our complete System Design interview course.