Alex Rivera | Logout

How can Google be so fast?

Asked 2008-09-25T09:42:55.387
89

What are the technologies and programming decisions that make Google able to serve a query so fast?

Every time I search something (one of the several times per day) it always amazes me how they serve the results in near or less than 1 second time. What sort of configuration and algorithms could they have in place that accomplishes this?

Side note: It is kind of overwhelming thinking that even if I was to put a desktop application and use it on my machine probably would not be half as fast as Google. Keep on learning I say.


Here are some of the great answers and pointers provided:

Edit
Report

3 Answers

26

It's a bit too much to put it in one answer. http://en.wikipedia.org/wiki/Google_platform

answered 2008-09-25T09:47:22.613
4

One of the most important delays is webservers is getting your query to the webserver, and the response back. THis latency is bound by the speed of light, which even Google has to obey. However, they have datacenters all over the world. As a result, the average distance to any one of them is lower. This keeps the latency down. Sure, the difference is measured in milliseconds, but it matters if the response has to arrive within 1000 milliseconds.

answered 2008-09-25T09:53:27.590
3

An attempt at a generalized list (that does not depend on you having access to Google's internal tools):

  1. Parellelize requests (e.g. break up a single request in to smaller sets)
  2. Async (make as much asynchronious as possible, e.g. won't block the user's request)
  3. Memory/cache (Disk I/O is slow, keep as much as possible in memory)
  4. Pre-compute (Do as much work as possible before hand, don't wait for a user to ask for data/processing)
  5. Care about your front-end HTML (see Yslow and friends)
answered 2008-10-31T18:58:07.930

Your Answer