Steps how to approach the system design questions in interviews

Steps how to approach the system design questions in interviews

Tech

These are the steps to go through mentally in the interviews, followed by actual interview experiences:

  • a) Be absolutely sure you understand the problem being asked, clarify on the onset rather than assuming anything
  • b) Use-cases. This is critical, you MUST know what is the system going to be used for, what is the scale it is going to be used for. Also, constraints like requests per second, requests types, data written per second, data read per second.
  • c) Solve the problem for a very small set, say, 100 users. This will broadly help you figure out the data structures, components, abstract design of the overall model.
  • d) Write down the various components figured out so far and how will they interact with each other.
  • e) As a rule of thumb remember at least these :
      1. processing and servers
      1. storage
      1. caching
      1. concurrency and communication
      1. security
      1. load balancing and proxy
      1. CDN
      1. Monetization: if relevant, how will you monetize? eg. What kind of DB (Is Postgres enough, if not why?), do you need caching and how much, is security a prime concern?
  • f) Special cases for the question asked. Say designing a system for storing thumbnails, will a file system be enough? What if you have to scale for facebook or google? Will a nosql based database work?
  • g) After I have my components in place, what I generally try to do is look for minor optimization in various places according to the use-cases, various tradeoffs that will help in better scaling in 99% cases.
  • h) [Scaling out or up] (http://highscalability.com/blog/2014/5/12/4-architecture-issues-when-scaling-web-applications-bottlene.html)
  • i) Check with the interviewer is there any other special case he is looking to solve? Also, it really helps if you know about the company you are interviewing with, what its architecture is, what will the interviewer have more interest in based on the company and what he works on?

About the Author

Software Engineer

2 comments

  1. Step 1: Scope the problem
    You can’t design a system if you don’t know what you’re designing. Scoping the problem is necessary in order to ensure that you’re building what the interviewer wants as it may be something that the interviewer is specifically evaluating. If you’re asked something such as “design SmallURL,” you’ll want to first understand what exactly you need to implement. Will the users be able to specify their own short URLs, or will it all be auto-generated? Will you be keeping track of any stats on the clicks? Do the URLs have a timeout?

    These questions should be answered before you proceed in the design process. Make a list of the major features or use cases. For example, for SmallURL it might be:

    Shortening a URL to a Small URL
    Analytics for a URL
    Retrieving the URL associated with a Small URL
    User accounts and link management
    Step 2: Make reasonable assumptions
    It’s okay to make some assumptions when needed, but they should be reasonable. For example, it would not be logical …
  2. https://www.youtube.com/watch?v=z_YuqLmGZuo
Enter your comments here...
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
Site is Blocked
Sorry! This site is not available in your country.