The Framework to help you Ace your System Design Interviews

You will be able to implement this technique in every Design question

Devansh
DataDrivenInvestor

--

System Design interviews are tough for many people. Unlike with coding interviews, there isn’t a fixed way to proceed. Sure preparing for them by brushing up on Data Structures and Algorithms are important. They will help you with certain implementation details. However, implementation is where you will struggle. Systems Design questions are very high-level and vague. This is deliberate. This makes it very easy to get distracted and end up focusing on esoteric details. In short, Systems Design questions can be very tricky because while solving them, it’s very easy to miss the forest for the trees.

Photo by Alexander Shatov on Unsplash

Too abstract? Let’s take a practical example. A common question is “Design a video streaming platform like YouTube.” At first glance, this seems simple enough. We just have to design a video But when you get into it, there are so many parts to the platform. How do you recommend videos? How do we provide creators feedback/data? What kinds of protections do we want? How can we scale up efficiently as more users join (think of all the bytes that go into storing video likes, dislikes, comments along with the video itself)? What about international law? YT won’t play certain videos in certain countries. How do we accommodate this (programmatically)? Take a second to think about how you will approach this question before, reading on.

It becomes easy to miss the (random?)forest because you will end up focusing on the (maybe decision)trees.

A machine learning person like me might focus too much on the recommendation systems. Another person would go spend too much time on the storage optimization. Or maybe the video streaming encoding. Because the question is vague and high level, people will tend to pigeonhole themselves into their strengths. This is good to showcase technical ability, but most likely you will miss important details/facets on the problem.

Message from a student who I tutored

So how do we proceed? In this article, I will show you a specific framework that you can adopt to develop your systems design solutions. People I’ve worked with have used it to great success in their interviews. Above is one of the many messages that I have gotten from a student who nailed her interview at Capital One Bank. For examples of others, feel free to check out my other articles about acing technical interviews.

Discover the Who.

Let’s continue with our YT example. Before you start developing your system, take a step back and think of the users who will use it. Think of the broad categories of people who would interact with YT. This is where it helps to be observant. When I think of YT, I see 3 broad kinds of users. Creators, Viewers, and Advertisers. Once we identify the types of users (the who) we can start to look into designing the incentives for them to interact with the system. These incentives will allow us to add more users and keep existing users.

Develop the Whats and the Whys

Now is when we develop the whats (incentives/procedures) and the whys (why someone would interact with that kind of content). Take the creators on YT. Why would a creator take the time to create and share their work? Some of you might think of money/fame but remember most creators don’t make it that far. Many people started putting up videos because they wanted to store and share cool great memories/ideas. Putting it online would allow them to interact with other people who shared their interests. I started online content creation as a way to have a place that I could point to wrt my skills. Therefore for the creator, you want to lower the barrier to entry. You also want them to have detailed feedback so that they can continue to fine-tune their content and make things that viewers engage with. For example, Youtube Studio provides a lot of metrics, including where people find our videos. Following is what mine looks like right now.

My view sources breakdown for external views. Google promotes my content pretty heavily.

Speaking of viewers, why would they watch? Entertainment, to learn something specific, research would be plausible reasons. So from a user perspective, you want to make videos easy to find. Recommending other videos that they might like is also a good avenue to explore. This will keep them on your platform longer. Some level of feedback would be great. That’s why we have the like and dislike button. And lastly, viewers are more likely to have a good time if there is some way for them to have a community. The comments section is a great place for that. Comments sections in any community will be filled with running jokes and other community-related text. This is not to be overlooked.

Lastly, what would advertisers gain from coming to the platform? Eyeballs and an ability to align with different people/brands. How can we design the systems to suit them? Think of that.

Build a Self-Reinforcing System

Once we know why different personas will use the system we built we can design the incentives and technical aspects accordingly. How do we do this effectively? Simple design your system in a way where the feedback causes a positive feedback loop. Following is a simple example.

Rising prices lead to more investors. More investors leads to more demand which means higher prices.

Look at how elegantly YT did this. Originally creators started putting their videos to share their stuff. YT made it easy for them to do so by consolidating and easy uploads. As more creators shared their work, users interested in those fields came to watch them. As the user base grows, we have more people interested in different niches coming in. Suddenly the third persona (advertisers) can align themselves with creators that represent their brand. As this happens, more creators join and a positive spiral is created

Systems that reinforce themselves allow for the snowball effect. Don’t underestimate the potency of that.

Get into the How

Now that we have a high-level system sketched out, we will get into the weeds. This is where you show off your domain expertise. I will talk about writing recommendation systems and how representing users as nodes in a graph might be useful. Network experts can get into the exact protocols for streaming and encoding videos efficiently. This is where you go wild and show off your technical know-how and experience. For fields you don’t know much about, don’t waste your time. Spend a few minutes and bring it back to your strengths.

The benefit of holding this off until later is simple. By taking a high-level view of the system first, we can see the various parts that make it work. This way you will make sure that you don’t miss any important details/perspectives. in your answers

Closing

With this framework, you have some order to tackle your systems design interviews. To be better prepared make sure you’re familiar with 2–3 different aspects of technology. Whenever you interact with a platform, think of the who, why, what, and how. This will get you into the habit of analyzing things. Make sure you get consistent practice and get plenty of feedback during your learning.

Texts from a former student. We were discussing their experience and what helped the most.

If you liked this article, check out my other content. I post regularly on Medium, YouTube, Twitter, and Substack. I focus on Artificial Intelligence, Machine Learning, Technology, and Software Development.

Reach out to me

If that article got you interested in reaching out to me, then this section is for you. You can reach out to me on any of the platforms, or check out any of my other content. If you’d like to discuss tutoring, text me on LinkedIn, IG, or Twitter. If you’d like to support my work, using my free Robinhood referral link. We both get a free stock, and there is no risk to you. So not using it is just losing free money.

Check out my other articles on Medium. : https://rb.gy/zn1aiu

My YouTube: https://rb.gy/88iwdd

Reach out to me on LinkedIn. Let’s connect: https://rb.gy/m5ok2y

My Instagram: https://rb.gy/gmvuy9

My Twitter: https://twitter.com/Machine01776819

If you’re preparing for coding interviews: https://codinginterviewsmadesimple.substack.com/

Get a free stock on Robinhood: https://join.robinhood.com/fnud75

--

--

Writing about AI, Math, the Tech Industry and whatever else interests me. Join my cult to gain inner peace and to support my crippling chocolate milk addiction