我正在使用 Nutch 1.17 来抓取超过百万个网站。我必须为此执行以下操作。
没有任何其他处理或后期分析。现在,我可以选择使用中等大小的 Hadoop 集群(最多 30 台机器)。每台机器都有 16GB RAM、12 核和 2 TB 存储。 Solr 机器也具有相同的空间。现在,为了保持上述状态,我对以下内容感到好奇:
a. How to achieve above document crawl rate i.e., how many machines are enough ?
b. Should I need to add more machines or is there any better solution ?
c. Is it possible to remove raw data from Nutch and keep metadata only ?
d. Is there any best strategy to achieve the above objectives.
最佳答案
a. How to achieve above document crawl rate i.e., how many machines are enough ?
假设选择了对同一域的连续提取之间的礼貌延迟:假设每个域每分钟可以提取 10 个页面,最大值。抓取速度为每小时 6 亿页 (
10^6*10*60
)。具有 360 个核心的集群应该足以接近这个速率。能否在 48 小时内彻底爬取一百万个域,取决于每个域的大小。请记住,提到的每域每分钟 10 个页面的抓取速度,只能获取 10*60*48 = 28800
每个域的页面在 48 小时内。c. Is it possible to remove raw data from Nutch and keep metadata only ?
一旦段被编入索引,您就可以将其删除。 CrawlDb 足以确定在 100 万个主页之一上找到的链接是否是新的。
- After the job completion, index URLs in Solr
也许在每个周期后立即索引段。
b. Should I need to add more machines or is there any better solution ? d. Is there any best strategy to achieve the above objectives.
很大程度上取决于域的大小是否相似。如果它们显示出幂律分布(很可能),那么您的域很少有数百万页(几乎没有穷尽爬网)和只有几页(最多几百页)的长尾域。在这种情况下,您需要更少的资源,但需要更多的时间来达到预期的结果。
关于hadoop - Nutch 1.17 网络爬取与存储优化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64058149/