Search Typeahead Q: How many queries per second should the system handle?
is it not 100 billion characters per day ?
Yes, you are right. 100 billion characters per day. But since, every character you type in is potentially a new search query for the system(you type in “m”- the system thinks that it should return all matching results starting with m. Now, you type in “mi” - the system thinks that it should return all matching results starting with mi and so on…), 100 billion characters per day is same as 100 billion queries to your system.
100 billion queries per day results in approximately 1.2 million QPS !!! I think google handles something in the range of 500K at top peak …
Sometimes these examples employ the wrong numbers … I found that to be the most inconsistent part about these system design problems on interviewbit.
Considering that the answer is in per day, the question should be “How many queries per day should the system handle?”
Yes the question should be either per day or calculation should be per second. 100 billion / per day = 100 * 10 pow9 / 86400*106 = 1.15 millions per seconds