Quiz - notes

Let's say that you were given the following question at an interview: "Design a system which allows its users to find web pages matching search terms that the user types. It must be able to handle sets of pages that have up to 10,000,000 pages in them". Considering that this design question is quite vague in its description what are suitable clarification questions to ask the interviewer? Check all answers that are true.

  • What kinds of web pages will the system search through - with text, images, video, etc?

  • What are the expected load and distribution of the search queries?

  • How should I structure the data needed to match pages to search queries?

  • Should the search terms match exactly terms in the web pages or we will need some sort of fuzzy matching, too?

  • What will be the algorithm, which matches search terms to web pages?

Explanation:

When asking clarification questions you should be getting information about the requirements for the problem. Try not to ask questions, which you should give the answers to. For example, in this question, you will probably have to suggest the algorithm for matching search terms to web pages. Also, the structure of the data is something that you will have to come up with. (b)

Let's say that you are in the middle of a system design interview and you have outlined a high-level design solution for the problem you were given. In such a situation which of the following things are RED FLAGS that something is not right with this design and that it must be reconsidered?

  • The solution has a bottleneck, which could be resolved by adding a load balancer that handles the incoming user requests and distributes them to a number of machines

  • With the current design the system would need to use tons of memory in order to be able to handle the number of requests defined by the interviews. This is a trade-off that the interviewer does not want to make.

  • The system would NOT be able to guarantee data consistency for all expected users while this is a critical requirement from the interviewer.

  • The database used in the design won't be able to respond as quickly as needed to all incoming queries. However, the requirements are such that allow you to cache the responses to most of the queries and this would alleviate the load on the database significantly.

Explanation:

If your high-level design has bottlenecks or other problem that can be overcome _without making impossible trade-offs _then the design is probably solid. However, if it has issues that violate some of the problem constraints and you cannot come up with a good way to resolve them then perhaps you should look for another high-level design solution.

results matching ""

    No results matching ""