If you're preparing for the technical program management interview, you already know that the interview generally consists of four types of questions. These are program sense, cross-functional partnerships, behavioral, and system design questions. Of the four, many find the system design questions to be both the most challenging and the most significant for your chances of an offer.
As such, it's wise to dig deep into the topic. So what is system design after all? What are some of the most critical things TPMs need to know to succeed during their system design questions? In this article, we've decided to answer these questions and more. Let's get to it!
An Overview of System Design
Before we go further, let's establish the context behind the system design questions during a TPM interview. Candidates are asked these types of questions to qualify their abilities to design a system to solve open-ended or complex technical problems. Generally speaking, an interviewer is not assessing a candidate's ability to build a perfectly ideal or best possible system. Rather, they're analyzing how you break down multifaceted issues while finding functional solutions.
As we mentioned, this is a crucial part of every TPM interview. It's not uncommon for a candidate's performance during system design questions to determine which level (if any) they are hired into. Not to worry, in this article, we're prepared to go in-depth on many of the fundamentals of system design you'll need to ace these interview questions.
What is System Design?
System design is simply the design and definition of the interfaces, modules, data, and overall architecture of a technical system given some particular requirements or specifications. For instance, Facebook's News Feed, Twitter's API, Google's Search, and even Instagram are all examples of these technical systems. Ultimately, system design is focused on how these technical systems should be executed and built.
Many system design problems share the same fundamentals, such as system architecture, databases, content requests, load balances, and more. Here's an overview of some of the concepts you should review for the most successful system design interview.
Model-View-Controller (MVC) is a popularly used architecture pattern used for developing software applications that need to include graphical user interfaces. In years past, it was typically used to build user interfaces for desktop applications. However, it has since come into fashion for developing UIs for web and mobile applications too.
MVC architecture has been used by software developers ever since the 1980s. As such, a majority of programming languages used today include frameworks that support the use of MVC architecture. Examples of these frameworks include Apple's UIKit for iOS apps, ASP.NET MVC, Rails, Django, Spring, Express, AngularJS, and Backbone.
The utility behind MVC is the division of the program and its underlying logic into three parts. These three components are:
The purpose behind MVC and separating the components this way is to separate the program's internal representations of information from the representations that are ultimately presented to the user. In doing so, developers can produce much more user-friendly GUIs for their applications.
Oftentimes, data was traditionally stored in relational databases, which grouped data in tables, rows, and columns. Yet, developers increasingly found that as the size of their data increased, relational databases would start to bottleneck with a system's CPU or its memory, among other things. This would require continuously more advanced and expensive hardware to keep the application running and performing well. At a certain point, even the most high-end hardware can't support the necessary data using just relational databases when it comes to most applications.
As such, developers started taking advantage of database sharding. They found that, in some instances, it was possible to spread data throughout several different servers. This is database sharding. The process looks like this: large tables of data are broken up into horizontal partitions, called shards. Each shard contains a piece of the entire table of data. Sharding is the act of placing each shard, or a horizontal slice of the whole table, onto separate servers.
The memory management of an application refers to the way it is designed to allocate and free up memory while the program is being executed. Many of the newer programming languages allow for automatic memory management. However, some of the most commonly used programming languages like C and C++ do not include these automatic memory management features. Instead, developers using these languages need to allocate and free up memory themselves in their code.
Memory storage comes in two different forms: Stack and Heap. While memory on the stack is automatically managed, Heap storage is not. Memory allocation functions similarly for most systems. However, the techniques developers used to release memory can vary quite a bit.
TPMs should take note: effective memory management relies on each allocation being matched by one, and only one, de-allocation. Otherwise, the following scenarios could play out in your applications:
- If some piece of allocated memory is not released, then this memory will 'leak.' This just means that the memory would become unusable until the final termination of a program. If memory is leaking, the program will eventually run out of memory to use. This will result in the program crashing completely.
- On the other hand, if a program tries to release memory that has already been de-allocated, it will only release memory actively being used. This can also result in crashes or system failures, or even more unpredictable consequences such as security exploits if not addressed.
At the end of the day, manual memory management is responsible for the most bugs during development. All a developer needs to do is make a mistake with their allocation or de-allocation calls for problems to arise. Not only that, but it's not always easy for developers to know how memory should be properly released when using certain libraries. That's why many of the more contemporary programming languages, like Python, include features that automatically manage an application's memory. These usually come in the forms of Garbage Collection and Automatic Reference Counting.
When it comes to building scalable web applications, load balancers are a crucial part of system designs. A load balancer refers to a kind of web server that distributes web traffic coming into the application throughout multiple backend servers. They literally balance the load of a web application's traffic volume so that it can scale up or down effectively with ease. Load balancers also improve and maintain the web application's availability while ensuring that its server's resources and capacity are managed more effectively.
When it comes to load balancers and system design, there are three main considerations to keep in mind:
- Turning into bottlenecks. If a system design does not utilize enough load balancers, they may become bottlenecks themselves as the application scales. As the traffic of a web application increases, additional load balancers need to be implemented to maintain the application's availability.
- Configuring for user sessions. Depending on the particular session data of an application, load balancers may need to be configured correctly to prevent problems. For instance, if a user's session requests are balanced among several different servers while session data isn't shared across these servers, the applications may not function correctly.
- Load balancers may result in longer deploys. Load balancers could cause some delays when new server versions need to be deployed. The nature of load balancers means that traffic from the old servers needs to be rolled over to the new servers, and this could lead to longer deployment times.
Caching is a data storage technique that is ubiquitous throughout computer systems and plays an important role in designing scalable Internet applications. A cache is any data store that can store and retrieve data quickly for future use. This enables faster response times and decreasing load on other parts of your system. If it wasn't for caching, our computers and the entire internet itself would run unusably slow. Caching makes use of something called locality to improve access time. Locality is when data is stored closest to where it's most often or most likely to be used by a system. This system design is universally used in computers for a variety of tasks. Surfing the web, for example, involves the caching of images by your web browser, where data is temporarily stored on your hard drive.
When it comes to web applications running at large scales, caching is invaluable with the necessary data retrieval. It can make the retrieval process much more efficient by minimizing reoccurring calculations, database queries, or other system requests. In doing so, caching allows system resources to be used for other operations and support a greater volume of traffic.
In other contexts, caching may be referring to the act of storing some pre-loaded data that would be much more difficult or resource-intensive if it was instead loaded on-demand.
Tips for System Design Interviews
System design questions during your TPM interview may be the most 'softwarey' of the bunch. Therefore, previous experience with software engineering or development will help you prepare for these questions. But here are some crucial tips to ensure you answer these questions most effectively.
What to do:
- Be sure to define the who and what of a problem for your interviewer before you start developing your solution. Doing so will allow you to elaborate on the various pros and cons of a particular solution or set of solutions.
- With these and other interview questions, your interviewer is always analyzing your reasoning and decision-making process. You should define all the tradeoffs associated with the different options you can take throughout your solution. Specifically, you should explain why the options you choose are best. For instance, if the system design question is focused on memory management, layout all the techniques you could choose in the context of the problem, and explain exactly why your chosen technique is the best one.
- Always go the extra mile and explain the rationale behind your decisions or solutions. Always be answering the 'why' behind your solution.
What not to do:
- Don't leave out any explanations, even if they may be obvious to you or the interviewer. It may feel strange to explain at times, but the interviewer is ultimately concerned with how you think and work through solutions. The obvious bits are just as important to them in this context. As a rule of thumb, if your interviewer asks you why you made a decision or chose some option, you should have explained it while you were laying out your solution.
- Don't hesitate to borrow concepts or architecture from your past experience in your interview solutions. As long as you thoroughly explain your reasoning when doing so.
- The job candidate is the one who ultimately should be driving this interview. Therefore, you shouldn't ask the interviewer what their preferred options or solutions are. They want to know what you're ideal solution is, not theirs.
Join Exponent's Community of Tech Insiders and Interview Experts
TPM interviews can be very challenging, especially when they're at the largest tech companies. But that doesn't mean you have to prepare alone. Exponent has a thriving community of aspiring product managers, software engineers, interview coaches, and tech industry insiders that can help you in your interview prep. You can also take advantage of our TPM interview prep course. We also have Product Management, Software Engineering, Data Science, Product Marketing Management, and Product Design interview courses available to our community.
Exponent also provides our community with access to industry-leading interviewing coaching to help you perform your best on interview day. Connect with TPM coaches that have worked at Stripe, LinkedIn, Facebook, or even Amazon! Join the ranks of the dozens of partnering tech industry insiders with expertise in program management, product management, software engineering, product design, and data science. You can find a full list of coaches here. So, what are you waiting for? Sign-up and book a session today!