Turning binary trees upside down on a whiteboard is a cool skill set, however, it only gets one so far in one’s tech career. Usually, junior to mid-level software engineering positions require coding chops and as one interviews for senior positions, the candidate is expected to demonstrate proficiency in designing applications consisting of several loosely coupled subsystems that work in tandem to deliver a service catering to several million users. The complexity of these systems spans a spectrum with some as narrow in functionality as a cache and some as broad and wide in scope as an Uber or Twitter.
You may wonder the rationale behind such questions in interviews and there are several good reasons why system design questions are an interview favorite. Some reasons to ask candidates system design interview questions are:
Interview coding problems usually have a binary outcome, either the candidate is able to work out the right solution or not. The candidate’s solution can be executed against sample data and tested for correctness especially when the candidate solves the problem on a laptop instead of a whiteboard. Either the candidate gets the coding problem right or not. However, the same isn’t true of system design interview questions. These questions are for the most part open-ended and subjective, used to plumb the depth of a candidate's knowledge on a broad range of computer science topics. Very often these questions will have multiple right answers or different answers under varying constraints and requirements.
At the heart of system design questions are distributed systems. With the advent of web 2.0 and the plethora of internet companies, it is essential that services such as Uber, Lyft, Twitter, Pinterest, etc. continue to run without interruption and have the ability to scale to serve the entire world population if need be. The “system” usually refers to such a product and is composed of several other sub-services which in turn may themselves be entire systems in themselves.
System design means fleshing out higher level details for creating a service from scratch. We can keep the design as abstract or granular as we like but usually it stops short of actual implementation logic and code. The design usually encompasses the following:Remember, unlike coding problems there’s no silver bullet for a system design question. System design questions require candidates to explain how smaller systems can be orchestrated to build one larger system. Sometimes, the candidate may be asked to get into the finer details of a particular component but generally these interview rounds are code-free. As a candidate, consider the system design round as a technical presentation accompanied by a lot of whiteboard-ing.
Unlike coding interviews, a candidate can hand-wave and talk in abstractions during a system design interview. There’s no compiler to nit-pick or corner-case test cases to execute, nevertheless, the system design interview still serves as a litmus test to the professional and technical maturity of a candidate. Generally an interviewer observes the following competencies in a candidate’s performance during a system design interview:
There’s no better preparation for system design interviews than actually working with and contributing to the source of both private and public distributed systems. Books can help too, especially when learning the theory of distributed systems. We would suggest reading the book designing data intensive applications for all readers to get started with distributed systems. Reading up on the documentation of existing open-source distributed systems such as Hadoop, Cassandra, Google Borg, Kuberetes, Kafka etc and latest research papers in the field is a great way to enhance one’s understanding of the design of such systems.
However, to be fair, most software developers don’t interact with distributed systems as part of their day to day activities. Most of us work on already mature systems where incremental features are added or maintenance work is in progress. Rarely do we get to work on a truly distributed system with millions of users being built from scratch. It is this lack of exposure rather than incompetency that most software engineers don’t fare well in system design interviews. Gaining expertise in system design will not happen overnight and require years of working in, reading about and designing distributed systems.
Most candidates will need a shot-in-the-arm or a magic pill to help prepare for system design interviews in just a few weeks rather than progressively develop their system design expertise over several years. There are several paid courses on the market with varying quality and usability for system design interview prep with Grokking the being the first of its kind. Our goal is to open-source system design preparation for all candidates and provide free high quality curated content for system design preparation. You can start off by reading our first blog on designing a URL shortener.