Some scientists claim that falling in love takes a fifth of a second. And there’s also something else that happens a billion times a day that also takes a fifth of a second: a Google search.

But have you ever wondered what happens behind the simple white homepage? What happens in the blink of an eye — how Google search actually works?

If you’re using Google search you might sometimes wonder how it looks like ‘behind’ the white homepage. It’s a mixture of science, creativity, experimentation and cold, hard maths. Google indexes billions and billions of web pages, our index is well over 100 million gigabytes and is constantly updated as 16 per cent of daily searches are new.

The journey of a query begins long before you ever type in the search. Search engines such as Google use software robots — known as Web crawlers, or spiders — which ‘crawl’ through the World Wide Web, moving from link to link to find web pages and taking the data on them back to Google’s servers. Imagine the Web as a giant book with billions of pages. What Google is in the business of doing is indexing that book — in other words trying to make sense of information that might potentially answer a user’s query. Google index is one of the biggest on the Web, and we’ve spent one million computing hours building it so far.

Back to the search itself, there are billions of searches a day on Google. As you type your query [e...], Google’s predictive system begins offering you options: ESPN, Ebay, Expedia, Etsy... almost instantly throwing up results. This is what we call Google Instant. Google Instant is a search enhancement that shows results as you type. We are pushing the limits of our technology and infrastructure to help you get better search results, faster.

Our key technical insight was that people type slowly, but read quickly, typically taking 300 milliseconds between keystrokes, but only 30 milliseconds to glance at another part of the page. This means that you can scan a results page while you type. The most obvious change is that you get to the right content much faster than before because you don’t have to finish typing your full search term, or even press ‘search’. Another shift is that seeing results as you type helps you formulate a better search term by providing instant feedback. You can now adapt your search on the fly until the results match exactly what you want. In time, we may wonder how search ever worked in any other way.

What is a Google algorithm?

As for the Google algorithm itself, this is the computational formula that governs searches on Google. The algorithm then looks at the query, then asks over 200 questions, which we call signals, to decide which of the millions of pages are the most relevant answers for that query. We also render a preview of those web pages which you can see by hovering on the arrows to the right of the result, so you can quickly decide if it’s a site you want to visit. The Instant Previews load in 1/10th of a second on average. The average Google query travels 1500 miles. The data travels close to the speed of light, at hundreds of millions of miles an hour. Information travels over the internet in what are called packets. Packets are parts of a file comprising a certain number of units of digital information, or bytes. Different requests may travel by different pathways as they search for the quickest route and avoid blockages on the Internet.

They moved along fibre-optic cables or another high speed connection, to a Google data centre which might be situated anywhere in the world. The data centre is a facility that houses a large number of computers that store and serve vast amounts of data. Most medium to large-sized companies have, or use, some kind of data center. But for Google, data centers are especially important.

While Google cannot reveal the ‘secret recipe’ of the algorithm, the algorithm takes into account the freshness of content on a website, the number of other websites linking to a particular site and the authority of those links. Words on the webpage, site speed and the website’s structure are also important factors in Google’s ranking. The algorithm is not a fixed recipe; it is constantly being finessed with around 500 improvements last year. More than 1,000 man-years have gone into developing the Google search algorithm.

The writer is vice-president and Google fellow. Views expressed by the author are his own and do not reflect the newspaper’s policy