Friday, April 19, 2024

How To Prepare For System Design Interview

Don't Miss

Questions Related To This:

How to best prepare for system design interviews | Top Tips for system design interviews preparation
  • 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.

Dont Let The Interviewer Screw You Up

Remember, youre driving the interview. So dont expect the interviewer to necessarily ask you about all the areas youre expected to discuss to pass the interview. Its tricky though, because interviewers will guide you to areas to focus on, and some interviewers do ask lots of detailed questions. If you finish the interview and think phew, he didnt ask me about concurrency!, you probably did poorly.

This isnt just the hardest interview to prepare for, theyre also hard to conduct. Some interviewers will get off track honing in on tiny details or seem satisfied with very shallow answers. Dont forget, youre not just convincing the interviewer, youre convincing the interview panel. So dont be afraid to shift the direction of the conversation to cover areas where you can add more signal. Offer to cover things, I could make a diagram of this. Obviously, you dont want to be too pushy, if theyre asking you questions or directing you to a specific area, make sure you cover it. Avoiding answering a direct question is nearly always fatal in interviews.

How Do You Design A Chat Application Like Whatsapp Or Facebook Messenger

You have surely used WhatsApp and Facebook, right? No? If not let me tell you that a chat application allows you to send messages to your friend. Its a point to point connection.

You keep a friend list and see their status and chat with them. In WhatsApp, you can also connect groups but that is for advanced and experienced developers. At a minimum, you should provide a design to keep a friend list and send and receive messages from them.

If you need some tips then I suggest you check out Preparing for the System Design Interview Course on Udemy, where you will find a whole case study to solve this problem.

9. How do you design a Twitter Clone?Twitter is a popular messaging service that lets you broadcast your messages to all your followers. You tweet and your followers see those messages, they can like or retweet.

Make sure you implement common features like followers, hashtag, tweet, delete, etc. If you going nowhere and stuck, you can follow the solution on System Design Interviews: Grokking the System Design Interview.

10. How to design a global video streaming service like YouTube or NetFlix?While designing a video streaming service like NetFlix or YouTube key thing is smooth streaming and buffering and functioning over low bandwidth connection, how do you manage those challenges. You can check out this system design course to learn how to deal with such problems.

12. How do you design an API Rate Limiter?

13. How do you design Twitter Search?

You May Like: What To Wear To An Interview Women

Section : System Availability

Software engineers aim to build systems that are reliable. A reliable system is one that consistently satisfies a user’s needs, whenever that user seeks to have that need satisfied. A key component of that reliability is Availability.

It’s helpful to think of availability as the resiliency of a system. If a system is robust enough to handle failures in the network, database, servers etc, then it can generally be considered to be a fault-tolerant system – which makes it an available system.

Of course, a system is a sum of its parts in many senses, and each part needs to be highly available if availability is relevant to the end user experience of the site or app.

Section : Leader Election

System Design Interview Preparation Github

Let’s move back to servers again for a slightly more advanced topic. We already understand the principle of Availability, and how redundancy is one way to increase availability. We have also walked through some practical considerations when handling the routing of requests to clusters of redundant servers.

But sometimes, with this kind of setup where multiple servers are doing much the same thing, there can arise situations where you need only one server to take the lead.

For example, you want to ensure that only one server is given the responsibility for updating some third party API because multiple updates from different servers could cause issues or run up costs on the third-party’s side.

In this case you need to choose that primary server to delegate this update responsibility to. That process is called leader election.

When multiple servers are in a cluster to provide redundancy, they could, amongst themselves, be configured to have one and only one leader. They would also detect when that leader server has failed, and appoint another one to take its place.

The principle is very simple, but the devil is in the details. The really tricky part is ensuring that the servers are “in sync” in terms of their data, state and operations.

In other words, a consensus algorithm is used to give all the servers an “agreed on” value that they can all rely on in their logic when identifying which server is the leader.

Also Check: Questions To Ask Cfo During Interview

Types Of System Design Interview Questions

There are various types of system designs such as architectural design, physical design, logical design, etc. Various categories of system design interview questions are also based on these system designs.

The categories of system design interview questions are as follows:

  • Low-Level Design System design interview questions
  • High-Level Design System design interview questions
  • Object-Oriented System design interview questions

Be Familiar With Basic Knowledge

I cant recall how many times Ive emphasized this point, but its really important for system design interview. As system design questions are open-ended and may cover many technical fields, the basic knowledge here is much more than data structure and algorithm.

First of all, theres no doubt you should be very good at data structure and algorithm. Take the URL shortening service as an example, you wont be able to come up with a good solution if you are not clear about hash, time/space complexity analysis.

Quite often, theres a trade-off between time and memory efficiency and you must be very proficient in the big-O analysis in order to figure everything out.

There are also several other things youd better be familiar although its possible that they may not be covered in your interview.

Remember, the point is here asking you to learn all these stuff from scratch, which may take you more than a year. What really matters is the basic concepts behind each topic. For instance, its totally okay if you cant implement neural network in the interview, but you should be able to explain it within a sentence.

Don’t Miss: What To Wear To An Interview Women

Design A Url Shortening Service

URL shortening service allows users to enter a long URL, and then it returns a shorter, unique URL. For example bit.ly and TinyURL. These services generate a short URL if user gives a long URL and if the user gives a short URL then it returns the original long URL.

Things to discuss and analyze:

  • Given a long URL, the service should generate a shorter and unique alias of it.
  • When the user hits a short link, the service should redirect to the original link.
  • Consider scalability if 1000s of URL shortening requests coming every second.
  • Service handle redirects.
  • Support for custom short URLs.
  • Track click stats.
  • System should be highly available.

    You need to consider three things while designing this service.

  • API- Discuss how client will follow an approach to communicate with the service along with load balancer which is the front end of the service.
  • Application Layer Discuss how the worker thread or hosts that will take the long URL, generate the tiny URL and how it will store both of the URLs in the database .
  • Persistence Layer

    What Kind Of Files Can Be Stored Within An Organizational System

    System Design Introduction For Interview.

    You might be asked this question to gauge your concept of keeping your design elements organized within an online system. You can highlight your organizational and technical skills by addressing the question and providing evidence of how you used this concept in your past roles.

    Example:”The main file types I integrate within an organizational system include master, table, transaction, mirror, temp, log and archive files. Each file type will have specific properties that categorize it according to system and user information, chronological lists and backup data.”

    Recommended Reading: Questions To Ask The Cfo In An Interview

    Differentiate Between Compile Time Polymorphism And Runtime Polymorphism

    Compile Time Polymorphism

    A. It is also called Static Polymorphism.

    B. This type of polymorphism happens at the compile time.

    C. The compiler gets to decide the shape or value that has to be taken by the entity in the photograph.

    A. It is also called Dynamic Polymorphism.

    B. This type of polymorphism happens at the run time.

    C. Here, the shape or value that has to be taken by the entity in the picture is not decided by the compiler.

    3. Name different types of constructors in C++.Ans. There are three types of constructors in C++, which are as follows:

    • Default Constructors: It does not take any argument and has zero parameters.
    • Parameterized Constructors: These types of constructors take some argument.
    • Copy Constructors: It is a member function, and its basic function is to initialize the object using another object of the same class.

    Web Application & Software Architecture 101

    This is another excellent course from Educative to learn about Web application architecture. In this course, you will learn about different architectural styles like monolith, microservices, client-server, 3-tier architecture, decentralized peer-to-peer architecture, and how request and data move in web application.

    You will also learn about how to think big and think in terms of layers, performance, scalability, and high availability, which is a must for todays application.

    The course not only introduces with the different architectural pattern but also explains the pros and cons of each approach and walk you through a different scenario where a particular architecture is more suitable than others.

    Here is the link to join this architecture course Web Application & Software Architecture 101

    To be honest with you, this is the best design and architecture course for not only senior developers but also every software developer out there as it will expand your thinking process and will you make a more confident web developer.

    There is a significant discount on the course now, and its available for just $53, the original price $79, its a bit expensive them Udemy courses but worth it.

    On the other hand, if you like Educative as a platform, you can also buy a subscription for just $17 per month , I have one, and I highly recommend you to get.

    Recommended Reading: What To Ask A Cfo In An Interview

    System Design: Messenger Service Like Whatsapp Or Wechat Interview Question

    This is another Youtube video where you can learn to solve another popular System design interview question about designing Whatsapp or WeChat like messaging application.

    This is a system design interview question asked at companies like Amazon, Facebook, Google, Microsoft, and many startups: How to design a messenger service like Whatsapp, WeChat, or Facebook Messenger?

    The instructor will guide you through this interview question, give you talking points, and point out the right questions to ask. A quick and easy explanation even if this is your first system design interview question.

    Here is the Youtube video you can watch to solve this system design problem:

    Why Is It Important To Prepare For A System Design Round:

    5 Common System Design Concepts for Interview Preparation ...

    Due to the lack of experience or knowledge in building scalable systems in everyday work, a lot of developers struggle with this round. Even after being a good Software Developer, they fail to get into good companies just because they fail to clear this round.

    So it’s important to focus on this round and prepare well to get into your dream company.

    Don’t Miss: Preparing For System Design Interview

    Listen To The Interviewer

    Even though youre meant to drive the interview, you still need to listen. These problems have lots of areas to go into depth, and the interviewer may be interested in one particular aspect. Make sure you listen to cues and go with the flow. As I mentioned before, ignoring or deflecting a direct question or request is a quick way to fail.

    Can You Talk Me Through Some Project Work That Best Illustrates Your Process And Your Favorite Type Of Solution They Dont Have To Be The Same Project

    Jason Mesut also might ask about a favorite solution for a complex interaction or rich data challenge.

    Too often job descriptions and interview questions are generic, Jason admits. In the more recent hiring roles Ive had, Ive been keen to find the specific points of difference and make sure I am expressing these in the interview. But more importantly, in a portfolio review, I want to ensure that I am hiring against those specific areas and asking to see work examples that map to those.

    When Jason worked at strategic UX design and front-end technology agency RMA Consulting, for example, he was very interested in people who had experience in designing for complex applications with rich interaction.

    I was keen to see any examples of that type of work to drill into, he remembers. If a candidate didnt have that, it was fine, as long as they didnt bullshit. I would just find something similar in their work to probe around.

    Don’t Miss: System Design Interview Prep

    Cheat Sheet Framework List

    This list below is a summary of the above and it is something you can use on the day.

    One option is to list these points in a “virtual” post it note at the beginning of the interview. And walk your interviewer through how you are planning to approach the problem. However use with caution as if you are not super strong on some of these points you might not want to draw unnecessary attention to it, use your own judgement on how much of the framework you’d want to make explicit.

    You should also make it clear that you are open to ver off into different direction at any points if they have questions or things they’d like to focus on. There’s generally not enough time to cover everything and is not uncommon that you might be asked to jump around to see if you can overall cover more ground.

    But personally, for the purpose of the interview, I would say you should aim to prep to be strong from point 1 to 5 and be able to confidently break down the problem statement and run the interviewer through those different parts.

    For prepping from 6 to 10, a good strategy is to aim to go over those sections and cover any gaps you might have in your knowledge.

    1. Requirements gathering 2. Define Scope + MVP3. Data entities 4. API end points5. Client side components architecture 5.1 Components Architecture - Wireframes5.2 Components Tree - diagram6. Optimization &  performance7. Accessibility 8. Testing Strategy9. Security10. Full Stack System design consideration

    Own The Interview Platform

    How to Prepare for Technical Interviews, Part 2 – System Design

    One of the few benefits of the Covid world is that system design interviews no longer happen on actual whiteboards. Instead theyre conducted online through platforms like CodePair and Google Docs . This actually gives the interviewee more ways to come to the interview prepared.

    First, ask the hiring manager about the platform and question format. Try to glean as much possible for example, how many questions to expect? How much time is allotted? etc Next, go onto the platform ahead of time and solve some actual problems. The whiteboard tooling on these platforms usually sucks, so getting familiar with it is essential otherwise half of the interview will be fumbling around.

    Login to the interview a few minutes early and copy over your template . If the interviewer has a problem with this, they can simply erase it. Have your Miro scratchpad up and ready for reference. Its better to ask if using reference materials is allowed, but frankly they cant stop you.

    Being prepared and comfortable with the platform is essential. I even had the experience where the CodePair session failed, but I was able to salvage the interview by sharing my Miro board and solving the problem there instead. Having this contingency in place surely left a favorable impression on my interviewer, and you never know which small detail may ultimately tip the scales in your favor.

    Pro Tip: Invest in a decent webcam and avoid a bad first impression replete with mic issues and grainy video.

    Recommended Reading: How To Prepare System Design Interview

    What I Learned Through Hundreds Of System Design Interviews

    The experience of working on web-scale systems at Facebook and Microsoft taught me two key skills to approaching the system design interview:

  • How to learn the fundamentals of distributed systems quickly and apply these principles in solving real-world problems
  • How to evaluate candidates while interviewing for system design
  • Heres the counterintuitive part: in the system design interview, companies are not actually trying to test your experience with system design.

    Successful candidates rarely have much experience working on large-scale systems, and interviewers know this. Again, this is a discipline that has only been around for about fifteen years, and like everything else in software engineering, it is evolving rapidly.

    The key is to prepare for the SDI with the intent to apply that knowledge.

    More articles

    Popular Articles