The magic that makes Google tick

Matt Loney, ZDNet UK

02 December 2004 10:43 AM

Tags: goog, search, google, page

Page II: Google's vice-president of engineering was in London this week to talk to potential recruits about just what lies behind that search page.

Obviously it would be impractical to run the algorithm once every page for every query, so Google splits the problem down.

When a query comes in to the system it is sent off to index servers, which contain an index of the Web. This index is a mapping of each word to each page that contains that word. For instance, the word 'Imperial' will point to a list of documents containing that word, and similarly for 'College'. For a search on 'Imperial College' Google does a Boolean 'AND' operation on the two words to get a list of what Hölzle calls 'word pages'.

"We also consider additional data, such as where in the page does the word occur: in the title, the footnote, is it in bold or not, and so on.

Each index server indexes only part of the Web, as the whole Web will not fit on a single machine -- certainly not the type of machines that Google uses. Google's index of the Web is distributed across many machines, and the query gets sent to many of them -- Google calls each on a shard (of the Web). Each one works on its part of the problem.

Google computes the top 1000 or so results, and those come back as document IDs rather than text. The next step is to use document servers, which contain a copy of the Web as crawled by Google's spiders. Again the Web is essentially chopped up so that each machine contains one part of the Web. When a match is found, it is sent to the ad server which matches the ads and produces the familiar results page.

Google's business model works because all this is done on cheap hardware, which allows it to run the service free-of-charge to users, and charge only for advertising.

The hardware
"Even though it is a big problem", said Hölzle, "it is tractable, and not just technically but economically too. You can use very cheap hardware, but to do this you have to have the right software."

Google runs its systems on cheap, no-name IU and 2U servers -- so cheap that Google refers to them as PCs. After all each one has a standard x86 PC processor, standard IDE hard disk, and standard PC reliability -- which means it is expected to fail once in three years.

On a PC at home, that is acceptable for many people (if only because they're used to it), but on the scale that Google works at it becomes a real issue; in a cluster of 1,000 PCs you would expect, on average, one to fail every day. "On our scale you cannot deal with this failure by hand," said Hölzle. "We wrote our software to assume that the components will fail and we can just work around it. This software is what makes it work.

One key idea is replication. "This server that contains this shard of the Web, let's have two, or 10," said Hölzle. "This sounds expensive, but if you have a high-volume service you need that replication anyway. So you have replication and redundancy for free. If one fails you have 10 percent reduction in service so no failures so long as the load balancer works. So failure becomes and a manageable event."

In reality, he said, Google probably has "50 copies of every server". Google replicates servers, sets of servers and entire data centres, added Hölzle, and has not had a complete system failure since February 2000. Back then it had a single data centre, and the main switch failed, shutting the search engine down for an hour. Today the company mirrors everything across multiple independent data centres, and the fault tolerance works across sites, "so if we lose a data centre we can continue elsewhere -- and it happens more often than you would think. Stuff happens and you have to deal with it."

A new data centre can be up and running in under three days. "Our data centre now is like an iMac," said Schulz." You have two cables, power and data. All you need is a truck to bring the servers in and the whole burning in, operating system install and configuration is automated."

Working around failure of cheap hardware, said Hölzle, is fairly simple. If a connection breaks it means that machine has crashed so no more queries are sent to it. If there is no response to a query then again that signals a problem, and it can cut it out of the loop.

That is redundancy taken care of, but what about scaling? The Web grows every year, as do the number of people using it, and that means more strain on Google's servers.

Advertisement

Talkback 20 comments

  1. Can't resist being a little PC and finding the parallel between Klingon and Tagalog a bit weird. The latter is a real language spoken by tens of millions of people. Its name sure sounds funny, but is that enough? Better to mention Google's other funny opt Anonymous -- 03/12/04

    Can't resist being a little PC and finding the parallel between Klingon and Tagalog a bit weird. The latter is a real language spoken by tens of millions of people. Its name sure sounds funny, but is that enough? Better to mention Google's other funny options like "Bork, bork, bork" and "Elmer Fudd".

  2. Very nice overview. Our compute farm has no direct correlation to google's, but there's still a lot we're learning from their work. Anonymous -- 03/12/04

    Very nice overview. Our compute farm has no direct correlation to google's, but there's still a lot we're learning from their work.

  3. Nice article. Always nice to get an "inside" look at one of the most popular and useful web applications on the planet. Hope to see more stuff like this - especially about Google. Anonymous -- 03/12/04

    Nice article. Always nice to get an "inside" look at one of the most popular and useful web applications on the planet. Hope to see more stuff like this - especially about Google.

  4. Thanks for the story. More interesting insights on the Google cluster can also be found here on <a href="http://www.tnl.net/blog/entry/How_many_Google_machines">http://www.tnl.net/blog/entry/How_many_Google_machines</a> Anonymous -- 03/12/04

    Thanks for the story. More interesting insights on the Google cluster can also be found here on <a href="http://www.tnl.net/blog/entry/How_many_Google_machines">http://www.tnl.net/blog/entry/How_many_Google_machines</a>

  5. This was a really cool article. Thanks Anonymous -- 03/12/04

    This was a really cool article. Thanks

  6. Hey, a "give me less commercial" button sounds wonderful. If you were looking for a camera then clicking this button would probably bring up technical articles, reviews, techniques etc, rather than 1000 results from shops and price comparison sp Anonymous -- 03/12/04

    Hey, a "give me less commercial" button sounds wonderful. If you were looking for a camera then clicking this button would probably bring up technical articles, reviews, techniques etc, rather than 1000 results from shops and price comparison spammers.

  7. How have you guys not done a story on the Google Sandbox??! Anonymous -- 04/12/04

    How have you guys not done a story on the Google Sandbox??!

  8. Klingon and Tagalog? I'm curious if you were aware that Tagalog was a real language since you put it in the same sentence as Klingon. Anonymous -- 05/12/04

    Klingon and Tagalog? I'm curious if you were aware that Tagalog was a real language since you put it in the same sentence as Klingon.

  9. Why is Tagalog placed in the same context as Klingon? It's hardly a rare language - it's used by the entire country of the Philippines! Wouldn't a more culturally sensitive connotation be in order here? Tagalog is hardly in the same class as an Anonymous -- 05/12/04

    Why is Tagalog placed in the same context as Klingon? It's hardly a rare language - it's used by the entire country of the Philippines!

    Wouldn't a more culturally sensitive connotation be in order here? Tagalog is hardly in the same class as an artificial language created for a science fiction series!

  10. Very cool article. Great insight on how the website works. Now, if only I could fit all of that power into my PC, maybe I could play some really top notch games. Anonymous -- 05/12/04

    Very cool article. Great insight on how the website works. Now, if only I could fit all of that power into my PC, maybe I could play some really top notch games.

  11. THE PAGE IS HANGING! In both IE and Firefox! Anonymous -- 06/12/04

    THE PAGE IS HANGING!

    In both IE and Firefox!

  12. Congrats to you and Matt Loney; good stuff. Got onto you from Wired. Anonymous -- 07/12/04

    Congrats to you and Matt Loney; good stuff.
    Got onto you from Wired.

  13. Spelling and grammar make this article a pain, although the subject matter is interesting. Too bad parts of it are nearly unreadable. Anonymous -- 07/12/04

    Spelling and grammar make this article a pain, although the subject matter is interesting. Too bad parts of it are nearly unreadable.

  14. Jesus, i never knew any of this, its really inresting, what surpised me was "Google runs its systems on cheap, no-name IU and 2U servers -- so cheap that Google refers to them as PCs. After all each one has a standard x86 PC processor, standard IDE h Anonymous -- 08/12/04

    Jesus, i never knew any of this, its really inresting, what surpised me was "Google runs its systems on cheap, no-name IU and 2U servers -- so cheap that Google refers to them as PCs. After all each one has a standard x86 PC processor, standard IDE hard disk, and standard PC reliability -- which means it is expected to fail once in three years."!!lol, using ide!!even i have sata, but with such a laugh business i can understand why they would use this as it is more cost effective.cheers !!!Mike!!...www.suprmobo.net!!

  15. Get a proofreader. 10-15 was supposed to be 10 to the power 15. And there are other errors and typos too. Embarr****ing. Anonymous -- 08/12/04

    Get a proofreader. 10-15 was supposed to be 10 to the power 15. And there are other errors and typos too. Embarr****ing.

  16. What amazes me is that with 200 computer doctors and 600 other computer science people, the results from Google in an average search is, many times, similar to other engines, such as Altavista and Webcrawler, with the same people and companies spamming th Anonymous -- 09/12/04

    What amazes me is that with 200 computer doctors and 600 other computer science people, the results from Google in an average search is, many times, similar to other engines, such as Altavista and Webcrawler, with the same people and companies spamming the top slots.

  17. Uh...Google keeps locking up....(Just Kiddin') Have A Merry Christmas! Anonymous -- 25/12/04

    Uh...Google keeps locking up....(Just Kiddin')

    Have A Merry Christmas!

  18. "104 interface languages including Klingon and Tagalog." Do your research man. You're crossing the racist line. Anonymous -- 28/12/04

    "104 interface languages including Klingon and Tagalog."

    Do your research man. You're crossing the racist line.

  19. umm interesting article Anonymous -- 07/01/05

    umm
    interesting article

  20. Nice article Ravi Shiraguppi -- 08/10/07

    wah... Nice Article.

    Ravi Shiraguppi.
    Sangolli Rayanna nagar,
    Dharwad.Karnataka.
    INDIA

Add your opinion


Latest Videos

ZDNet's CIO Vision Series

Department of Defence | Greg Farr, CIO (part two)

In the second part of his interview, Defence CIO Greg Farr talks about outsourcing, the skills crisis and reveals his most urgent IT priority.

Sponsored content

Power Centre - Content from our premier sponsors

Blogs

  • Angus Kidman I'm a celebrity, don't back me up
    Celebrity comes with its perks — free alcohol, better-looking partners, lots of holiday time — and disadvantages — constant media intrusions, being forced to appear in films with Eddie Murphy for the long-term good of your career, and having to do mindless radio interviews with angry men who've been awake since 4am.
  • Array Lies, damned lies and telco stupidity
    Earlier this month, Telstra put out a press release trumpeting that it's come up with a new phone coaching service to help people who are "bamboozled" by their mobiles. Another excellent example of wrongheaded thinking from the mobile industry.
  • Array Dear carriers: More walking, less talking
    Sometimes, a well-placed and well-timed letter can make all the difference. Other times, it can make no difference at all — and even hurt your case. This week's missive by the Competitive Carriers' Coalition, I would suggest, falls into the latter category.
  • More blogs »

Tags

Back to top

Featured