Prologue :

We do interviews a lot, and thought it's good time to document some of the questions that we ask. The goal of this series is primarily design interviews, and a list of things that we learn about the interviewee, without expecting anything specific. Think, that's too much ? Welcome to design, and the rules we should play by.

Rule 1 : There is no right or wrong answer.
Rule 2 : Design is about getting a better understanding of the problem and simplifying the solution.
Rule 3 : Design is about modelling a real world problem in computable form to understand the points of undecidability better.

It's not about scalability, reliability, availability or any other ****ability. In my mind, design should be separated into physical architecture and logical architecture. What we are going to discuss here is logical architecture and not physical architecture. Simply think of this design as something that can run in a turing machine. Now let's get to the problem

Problem statement

You are to design a logging infrastructure for your product. The product is made of different components, each running separately. You have to write a logging system that will do the following

  • Exposes API's that the components will use to send logs.
  • Logs should allow INFO, DEBUG, WARNING, ERROR
  • There can be multiple log servers, and they should be configurable.