SlideShare a Scribd company logo
1 of 28
Download to read offline
Spider
实现     Spider   细   节
们                           统        构    过
                       识 术语

    过         过        实现   “   ”讲   实现

        简单

         问题        论

监       馈

     键问题      预测        颈

读    论       Spike
务调   对   “   识   ”


战较
vs.




                                                               http://www.flickr.com/photos/blueblankut/497571704/sizes/z/in/photostream/




http://www.flickr.com/photos/coreyburger/2481836757/sizes/z/in/photostream/
构

处
构

归

    Dust

链          锚
构
                  页    识

链   务优    级   页       评

     评        键   识

    错惩罚                   历

    鲜

    访问
构

压

    ip压

     规则protocol   sitemap   robots.txt

链         检测
构
处




结构     识

         语义

             结构   识

              识

     联Link
构

词

词库   Trie树
构

        词

        图    Query转换

         词

        键词

 层      访问

Cache
杂             ……




http://www.flickr.com/photos/regolare/791385521/
说Spider……            构
线

实时优 级       线


实时               处       统Map-
                Reduce
      资
                节 资

                 馈       长   迟
Crawler Architecture

                                                                      Repository
               Downloader


                 Download                              Extractor
                  Worker                                Worker
                                                                    save page
                                                                    to repository



                   if 302 founded
get a link         update link
                   http status
                                     put downloaded
                                      page to queue


          links queue
                                                      pages queue   extract links
                                                                    and save


       main loop will put
       peek site's links to
       queue




           Crawler                                                     Linkbase
          main loop


Site will refill itself
when it's empty
                                    TaskLoader


                                Priority Heap
         Scope.txt                    Sites

                                Ordered Site
                                and their links
键   术
        储   统

        统   调   监

    线        驱动

链    储结构        务调
键   术
    Dust

页              Simhash

           PageRank评     还       简单   标评

词库         词
键       术
robust   html      css selector     lxml   tidy

认证码识

规则url

    术      proxy      术   还   UA伪
传1-NoSQL
统   储扩   颈   尝试   NOSQL
传-NoSQL
    统             结构   NOSQL   实现

优 队        Heap




    队

队       FIFO
传-NoSQL
    术选      围   这   选
为

    HBase

    Cassandra
传-NoSQL
 Cassandra

稳       问题 bug

    实                               Random
patitioning      对实

资

     对 Crawler   说    们   Crawler   严   赖
 锁   务

负    闻
传-NoSQL
CAP对         说应该

   HBase -> CP   Cassandra -> AP

实际 Cassandra     C
Crawler   link
传2-Google                动
incremental processing system -
  Percolator. a.k.a. Caffeine
传2-Google                           动
     BigTable    储 预

           务    证 timestamp oracle   lightweight
lock

           产    Notification         库   trigger

 线      Observer传递Notification

 统              费Notification   Percolator Worker实
现      们   线                    务
传2-Google                   动
对Map-Reduce   评

     迟




      赖       Locality   设计
传2-Google                          动
  Trade-off

                时    trillion:million
        Map-Reduce        迟

单Page   RPC     MR   过读        队   组   预读
  缓                  10   MR   RPC

    资
传2-Google                            动
Percolator      传统DBMS           DBMS

      查询语

  为          scale设计                    库       为   节
      Percolator         节                  节

      调 迟        调

  Percolator         义为shared-nothing parallel
  databases
Thanks

More Related Content

What's hot

TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例maclean liu
 
Hadoop安裝 (1)
Hadoop安裝 (1)Hadoop安裝 (1)
Hadoop安裝 (1)銘鴻 陳
 
Osc scott linux下的数据库优化for_postgresql
Osc scott linux下的数据库优化for_postgresqlOsc scott linux下的数据库优化for_postgresql
Osc scott linux下的数据库优化for_postgresqlOpenSourceCamp
 
Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)wang hongjiang
 
Pegasus KV Storage, Let the Users focus on their work (2018/07)
Pegasus KV Storage, Let the Users focus on their work (2018/07)Pegasus KV Storage, Let the Users focus on their work (2018/07)
Pegasus KV Storage, Let the Users focus on their work (2018/07)涛 吴
 
Ceph in UnitedStack
Ceph in UnitedStackCeph in UnitedStack
Ceph in UnitedStackRongze Zhu
 
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)涛 吴
 
Mysql企业备份发展及实践
Mysql企业备份发展及实践Mysql企业备份发展及实践
Mysql企业备份发展及实践maclean liu
 
加速開發! 在Windows開發hadoop程式,直接運行 map/reduce
加速開發! 在Windows開發hadoop程式,直接運行 map/reduce加速開發! 在Windows開發hadoop程式,直接運行 map/reduce
加速開發! 在Windows開發hadoop程式,直接運行 map/reduceWei-Yu Chen
 
Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)
Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)
Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)涛 吴
 
Dbbuild2
Dbbuild2Dbbuild2
Dbbuild2l l
 
NoSQL误用和常见陷阱分析
NoSQL误用和常见陷阱分析NoSQL误用和常见陷阱分析
NoSQL误用和常见陷阱分析iammutex
 
内部MySQL培训.3.基本原理
内部MySQL培训.3.基本原理内部MySQL培训.3.基本原理
内部MySQL培训.3.基本原理Lixun Peng
 
高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践rewinx
 
高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践Frank Cai
 
Hadoop程式開發環境
Hadoop程式開發環境Hadoop程式開發環境
Hadoop程式開發環境立鼎 蘇
 
Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)涛 吴
 

What's hot (20)

TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例
 
Redis介绍
Redis介绍Redis介绍
Redis介绍
 
Hadoop安裝 (1)
Hadoop安裝 (1)Hadoop安裝 (1)
Hadoop安裝 (1)
 
Osc scott linux下的数据库优化for_postgresql
Osc scott linux下的数据库优化for_postgresqlOsc scott linux下的数据库优化for_postgresql
Osc scott linux下的数据库优化for_postgresql
 
Aswan&hump
Aswan&humpAswan&hump
Aswan&hump
 
Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)Effective linux.3.(diagnosis)
Effective linux.3.(diagnosis)
 
Pegasus KV Storage, Let the Users focus on their work (2018/07)
Pegasus KV Storage, Let the Users focus on their work (2018/07)Pegasus KV Storage, Let the Users focus on their work (2018/07)
Pegasus KV Storage, Let the Users focus on their work (2018/07)
 
Ceph in UnitedStack
Ceph in UnitedStackCeph in UnitedStack
Ceph in UnitedStack
 
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
Pegasus: Designing a Distributed Key Value System (Arch summit beijing-2016)
 
Mysql企业备份发展及实践
Mysql企业备份发展及实践Mysql企业备份发展及实践
Mysql企业备份发展及实践
 
加速開發! 在Windows開發hadoop程式,直接運行 map/reduce
加速開發! 在Windows開發hadoop程式,直接運行 map/reduce加速開發! 在Windows開發hadoop程式,直接運行 map/reduce
加速開發! 在Windows開發hadoop程式,直接運行 map/reduce
 
Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)
Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)
Behind Pegasus, What matters in a Distributed System (Arch summit shenzhen_2017)
 
Dbbuild2
Dbbuild2Dbbuild2
Dbbuild2
 
Jvm内存管理基础
Jvm内存管理基础Jvm内存管理基础
Jvm内存管理基础
 
NoSQL误用和常见陷阱分析
NoSQL误用和常见陷阱分析NoSQL误用和常见陷阱分析
NoSQL误用和常见陷阱分析
 
内部MySQL培训.3.基本原理
内部MySQL培训.3.基本原理内部MySQL培训.3.基本原理
内部MySQL培训.3.基本原理
 
高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践
 
高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践高性能Web服务器Nginx及相关新技术的应用实践
高性能Web服务器Nginx及相关新技术的应用实践
 
Hadoop程式開發環境
Hadoop程式開發環境Hadoop程式開發環境
Hadoop程式開發環境
 
Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)
 

Viewers also liked

Write a redis client of your own
Write a redis client of your ownWrite a redis client of your own
Write a redis client of your ownChao Gao
 
Spider进化论
Spider进化论Spider进化论
Spider进化论cjhacker
 
Redis, a 2 minutes introduction
Redis, a 2 minutes introductionRedis, a 2 minutes introduction
Redis, a 2 minutes introductionMirko Calvaresi
 
Kiwi Pycon 2011 - The Magic of meta-programming
Kiwi Pycon 2011 - The Magic of meta-programmingKiwi Pycon 2011 - The Magic of meta-programming
Kiwi Pycon 2011 - The Magic of meta-programmingshearichard
 

Viewers also liked (6)

Write a redis client of your own
Write a redis client of your ownWrite a redis client of your own
Write a redis client of your own
 
Ecoptimiza
EcoptimizaEcoptimiza
Ecoptimiza
 
Spider进化论
Spider进化论Spider进化论
Spider进化论
 
Redis, a 2 minutes introduction
Redis, a 2 minutes introductionRedis, a 2 minutes introduction
Redis, a 2 minutes introduction
 
Kiwi Pycon 2011 - The Magic of meta-programming
Kiwi Pycon 2011 - The Magic of meta-programmingKiwi Pycon 2011 - The Magic of meta-programming
Kiwi Pycon 2011 - The Magic of meta-programming
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Similar to Crawler pieces

豆瓣数据架构实践
豆瓣数据架构实践豆瓣数据架构实践
豆瓣数据架构实践Xupeng Yun
 
Lamp高性能设计
Lamp高性能设计Lamp高性能设计
Lamp高性能设计锐 张
 
Beyond rails server
Beyond rails serverBeyond rails server
Beyond rails serverMichael Chen
 
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...acelyc1112009
 
分布式索引系统调研
分布式索引系统调研分布式索引系统调研
分布式索引系统调研zijingyeshao
 
How does Apache Pegasus used in SensorsData
How does Apache Pegasusused in SensorsDataHow does Apache Pegasusused in SensorsData
How does Apache Pegasus used in SensorsDataacelyc1112009
 
Huangjing renren
Huangjing renrenHuangjing renren
Huangjing renrend0nn9n
 
Thinking in React by Deot
Thinking in React by Deot Thinking in React by Deot
Thinking in React by Deot 荣德 周
 
淘宝搜索前端优化
淘宝搜索前端优化淘宝搜索前端优化
淘宝搜索前端优化Frank Xu
 
Web性能测试指标参考v0.2
Web性能测试指标参考v0.2Web性能测试指标参考v0.2
Web性能测试指标参考v0.2beiyu95
 
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储 Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储 zhen chen
 
Simple tech-talk
Simple tech-talkSimple tech-talk
Simple tech-talkliltos
 
优酷 Web网站架构案例分析
优酷   Web网站架构案例分析优酷   Web网站架构案例分析
优酷 Web网站架构案例分析George Ang
 
Key value store
Key value storeKey value store
Key value storexuanhan863
 
Youku arch qcon2009_beijing
Youku arch qcon2009_beijingYouku arch qcon2009_beijing
Youku arch qcon2009_beijingdrewz lin
 
百度 刘宁 系统也智慧
百度 刘宁 系统也智慧百度 刘宁 系统也智慧
百度 刘宁 系统也智慧guiyingshenxia
 
線上埋碼資料收集實作
線上埋碼資料收集實作線上埋碼資料收集實作
線上埋碼資料收集實作FEG
 
王鹏云:实时搜索架构分析
王鹏云:实时搜索架构分析王鹏云:实时搜索架构分析
王鹏云:实时搜索架构分析Leechael
 
Tup2王鹏云:实时搜索架构分析
Tup2王鹏云:实时搜索架构分析Tup2王鹏云:实时搜索架构分析
Tup2王鹏云:实时搜索架构分析yongboy
 
构建基于Lamp的网站架构
构建基于Lamp的网站架构构建基于Lamp的网站架构
构建基于Lamp的网站架构Cosey Lee
 

Similar to Crawler pieces (20)

豆瓣数据架构实践
豆瓣数据架构实践豆瓣数据架构实践
豆瓣数据架构实践
 
Lamp高性能设计
Lamp高性能设计Lamp高性能设计
Lamp高性能设计
 
Beyond rails server
Beyond rails serverBeyond rails server
Beyond rails server
 
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
 
分布式索引系统调研
分布式索引系统调研分布式索引系统调研
分布式索引系统调研
 
How does Apache Pegasus used in SensorsData
How does Apache Pegasusused in SensorsDataHow does Apache Pegasusused in SensorsData
How does Apache Pegasus used in SensorsData
 
Huangjing renren
Huangjing renrenHuangjing renren
Huangjing renren
 
Thinking in React by Deot
Thinking in React by Deot Thinking in React by Deot
Thinking in React by Deot
 
淘宝搜索前端优化
淘宝搜索前端优化淘宝搜索前端优化
淘宝搜索前端优化
 
Web性能测试指标参考v0.2
Web性能测试指标参考v0.2Web性能测试指标参考v0.2
Web性能测试指标参考v0.2
 
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储 Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储
 
Simple tech-talk
Simple tech-talkSimple tech-talk
Simple tech-talk
 
优酷 Web网站架构案例分析
优酷   Web网站架构案例分析优酷   Web网站架构案例分析
优酷 Web网站架构案例分析
 
Key value store
Key value storeKey value store
Key value store
 
Youku arch qcon2009_beijing
Youku arch qcon2009_beijingYouku arch qcon2009_beijing
Youku arch qcon2009_beijing
 
百度 刘宁 系统也智慧
百度 刘宁 系统也智慧百度 刘宁 系统也智慧
百度 刘宁 系统也智慧
 
線上埋碼資料收集實作
線上埋碼資料收集實作線上埋碼資料收集實作
線上埋碼資料收集實作
 
王鹏云:实时搜索架构分析
王鹏云:实时搜索架构分析王鹏云:实时搜索架构分析
王鹏云:实时搜索架构分析
 
Tup2王鹏云:实时搜索架构分析
Tup2王鹏云:实时搜索架构分析Tup2王鹏云:实时搜索架构分析
Tup2王鹏云:实时搜索架构分析
 
构建基于Lamp的网站架构
构建基于Lamp的网站架构构建基于Lamp的网站架构
构建基于Lamp的网站架构
 

Crawler pieces

  • 1. Spider 实现 Spider 细 节
  • 2. 统 构 过 识 术语 过 过 实现 “ ”讲 实现 简单 问题 论 监 馈 键问题 预测 颈 读 论 Spike
  • 3. 务调 对 “ 识 ” 战较
  • 4. vs. http://www.flickr.com/photos/blueblankut/497571704/sizes/z/in/photostream/ http://www.flickr.com/photos/coreyburger/2481836757/sizes/z/in/photostream/
  • 6. 构 归 Dust 链 锚
  • 7. 页 识 链 务优 级 页 评 评 键 识 错惩罚 历 鲜 访问
  • 8. 构 压 ip压 规则protocol sitemap robots.txt 链 检测
  • 9. 构 处 结构 识 语义 结构 识 识 联Link
  • 10. 构 词 词库 Trie树
  • 11. 词 图 Query转换 词 键词 层 访问 Cache
  • 12. …… http://www.flickr.com/photos/regolare/791385521/
  • 13. 说Spider…… 构 线 实时优 级 线 实时 处 统Map- Reduce 资 节 资 馈 长 迟
  • 14. Crawler Architecture Repository Downloader Download Extractor Worker Worker save page to repository if 302 founded get a link update link http status put downloaded page to queue links queue pages queue extract links and save main loop will put peek site's links to queue Crawler Linkbase main loop Site will refill itself when it's empty TaskLoader Priority Heap Scope.txt Sites Ordered Site and their links
  • 15. 术 储 统 统 调 监 线 驱动 链 储结构 务调
  • 16. 术 Dust 页 Simhash PageRank评 还 简单 标评 词库 词
  • 17. 术 robust html css selector lxml tidy 认证码识 规则url 术 proxy 术 还 UA伪
  • 18. 传1-NoSQL 统 储扩 颈 尝试 NOSQL
  • 19. 传-NoSQL 统 结构 NOSQL 实现 优 队 Heap 队 队 FIFO
  • 20. 传-NoSQL 术选 围 这 选 为 HBase Cassandra
  • 21. 传-NoSQL Cassandra 稳 问题 bug 实 Random patitioning 对实 资 对 Crawler 说 们 Crawler 严 赖 锁 务 负 闻
  • 22. 传-NoSQL CAP对 说应该 HBase -> CP Cassandra -> AP 实际 Cassandra C Crawler link
  • 23. 传2-Google 动 incremental processing system - Percolator. a.k.a. Caffeine
  • 24. 传2-Google 动 BigTable 储 预 务 证 timestamp oracle lightweight lock 产 Notification 库 trigger 线 Observer传递Notification 统 费Notification Percolator Worker实 现 们 线 务
  • 25. 传2-Google 动 对Map-Reduce 评 迟 赖 Locality 设计
  • 26. 传2-Google 动 Trade-off 时 trillion:million Map-Reduce 迟 单Page RPC MR 过读 队 组 预读 缓 10 MR RPC 资
  • 27. 传2-Google 动 Percolator 传统DBMS DBMS 查询语 为 scale设计 库 为 节 Percolator 节 节 调 迟 调 Percolator 义为shared-nothing parallel databases

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n