Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Google serve results so fast? [duplicate]

Time and again when I search for a topic on Google, Google returns me the results and also prints out some stats like

"Results 1 - 10 of about 8,850,000 for j2me. (0.24 seconds)"

I notice that the seconds taken by Google to serve the results are in fraction of a second range.

How does Google serve pages so fast, what kind of database optimization tricks has it used at its end?

like image 730
Kevin Boyd Avatar asked Aug 19 '09 09:08

Kevin Boyd


People also ask

Are everyone's Google results the same?

You may get the same or similar results to someone else who searches on Google Search. But sometimes, Google may give you different results based on things like time, context, or personalized results.

How are search engines so fast?

Algorithms carefully crafted. Hardware - cluster farms and massive number of cheap computers. Caching and Load Balancing. Google File System.

Why does Google give so many results?

Google's aim is to deliver the most accurate and relevant results for each individual search engine user, so the variations are entirely intentional. As search engines become increasingly sophisticated and intuitive they can provide more accurate search results.


1 Answers

I think the main reason for the frontend performance are:

  • Each request is distributed to a series of machines in parallel (I have read somewhere that each query hits around 12 machines), probably a single machines gathers the responses from these machines
  • All index data are held in RAM. With index data, I mean the term vocabulary and the postings list index and in the case of Google probably a lot more indexes e.g. for spelling corrections. Even with a single disk I/O somewhere the latency of the disk seek prevents such a performance.

Googles Map/Reduce, GFS are great tools for background processing, but they have nothing to do with the frontend performance.

like image 133
dmeister Avatar answered Oct 28 '22 04:10

dmeister