谷歌如何如此快速地提供结果? [英] How does Google serve results so fast?

查看:28
本文介绍了谷歌如何如此快速地提供结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我一次又一次地在 Google 上搜索某个主题时,Google 返回结果并打印出一些统计信息,例如

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

j2me 的结果 1 - 10,共 8,850,000.(0.24 秒)"

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

我注意到 Google 提供结果所需的秒数在几分之一秒范围内.

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?

推荐答案

我认为前端性能的主要原因是:

I think the main reason for the frontend performance are:

  • 每个请求都被并行分发到一系列机器(我在某处读到每个查询大约有 12 台机器),可能有一台机器收集这些机器的响应
  • 所有索引数据都保存在 RAM 中.对于索引数据,我的意思是术语词汇表和帖子列表索引,在谷歌的情况下可能有更多的索引,例如用于拼写更正.即使在某处使用单个磁盘 I/O,磁盘寻道的延迟也会阻止这种性能.
  • 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.

Google 的 Map/Reduce、GFS 是很好的后台处理工具,但它们与前端性能无关.

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

这篇关于谷歌如何如此快速地提供结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆