Wednesday, March 21, 2012

How Does Google Work

This morning as I sat down to my computer, it occurred to me that searching on the web has become such an integral part of life today that even the name of the leading search engine has become a verb for finding information – Google. The web has been a great innovation and has served – whether by design or by accident – as one of the fastest and most reliable means of distributing knowledge and information.
 
It is fast and fairly efficient. Well, for the most part anyway.

But have you ever wondered what takes place after you enter your search words into your favorite search bar and hit enter? It is something that we all take for granted today. You type in your query and in a couple of seconds, an over whelming list of possibilities is displayed – on the magnitude of millions – “there are 33,800,000 results for your search”.
 
But how does it all work? What happens? What are the steps that take place? And where does it all happen? Google Works

Here, then, is a guide to what happens during a typical Google search — now, of course, with automatic spell-check.

Query Box: It all starts with somebody typing in a request for information about the safest dog food, what time the D.M.V. closes, or what the prime rate is in China.

Domain-Name Servers: The software for Google’s domain-name servers runs on computers in leased or company-owned data centers all over the world, including one sitting in a small town in Eastern Washington. Their sole purpose is to shepherd searches into one of Google’s clusters as efficiently as possible, taking into account which clusters are nearest to the searcher and which are least busy at that instant.

The Cluster: The request ­continues into one of at least 200 clusters, which sit in Google-owned data centers worldwide.

Google Web Server: This program splits a query among hundreds or thousands of machines so that they can all work on it at the same time. It’s the difference between doing your grocery shopping all by yourself and having 100 people simultaneously find one item and toss it into your cart.

Index Server: Everything Google knows is stored in a massive database. But rather than waiting for one computer to sift through those gigabytes of data, Google has hundreds of computers scan its “card catalog” at the same time to find every relevant entry. Popular searches are cached—held in memory—for a few hours rather than run all over again. That means you, Britney.

Document Server: After the index server compiles its results, the document server pulls all the relevant documents—the links and snippets of text from its massive database. How does Google search the Web so quickly? It doesn’t. It keeps three copies of all the information from the internet that it has indexed in its own document servers, and all those data have already been prepped and sorted.

Spelling Server: Google doesn’t read words; it looks for ­patterns of characters, whether English, German or Sanskrit. If it sees your requested pattern a thousand times but finds a million hits for a similar pattern that’s off by one character, it connects the dots and politely suggests what you probably meant, even while it provides you the results, if any, for your fat-fingered query for “hwedge funds.”

Ad Server: Each query is simultaneously run through an ad database, and matches are fed to the Web server so that they’re placed on the results page. The ad team is in a race with the search team. Google vows to deliver all searches as quickly as possible; if ad results take longer to pull up than search results, they won’t make it onto the page—and Google won’t make money on that search.

Page Builder: The Google Web server collects the results of the thousands of operations it runs for a query, organizes all the data, and draws Google’s cunningly simple results page on your browser window, all in less time than it took to read this sentence.

Results ­Displayed: Often in 0.25 ­seconds or less.

So, the next time you hit your search box, remember that while we may take it all for granted, it is a rather awe inspiring process that takes place at a mind numbing speed. Not something to take for granted.

No comments:

Post a Comment