Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Traffic Server 介简
淘宝网 -- 核心系 研 :千石统 发
qianshi@taobao.com
http://www.flyinfo.net
Agenda
• 功能概览
• 架构 & 模型
• Plugin 开发
• 配置 CDN
TS 何物为
• Apache Traffic Server™ is fast, scalable and
extensible HTTP/1.1 compliant caching proxy
server.
回首 去过
功能概览
• web 代理 存缓
• 反向代理
• 多 存级缓
存命中缓
存未命中缓
反向代理
多 存级缓
并发问题
• C10k
– http://www.kegel.com/c10k.html
• C10k-C500k
– http://www.dbanotes.net/arch/c10k_c500k.html
• C1000k
– http:/...
步事件 理异 处
CPU 多核支持
架构
• 多 程 步状 机线 异 态
– 每个 听端口 建监 创 accept 程线
– 每个 core 分配 2-3 个 程线
– 独立的 程 理 控和日志线 处 监
– 每个活 的 求 持状 机跃 请 维 态
• 支持 Plugins
– ...
架构
架构
程模型线
同类比较
ATS HAProxy nginx Squid Varnish
Work Threads  X X X 
Multi-process X #

#

Event-driven     X
Plugin APIs  X...
Plugin 开发
Plugin 例子
Http 状态转换 Hook
Http 状态转换 Hook
配置 CDN
CONFIG proxy.config.http.server_port INT 80
CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url...
更多信息
• http://www.flyinfo.net/category/traffic-
server/
参考文献
• https://cwiki.apache.org/TS/traffic-
server.html
• Traffic Server Meetup, ApacheCon 2009.
• Leif Hedstrom, Apache T...
Thank you!
Any question?
Upcoming SlideShare
Loading in …5
×

Traffic server overview

7,244 views

Published on

Traffic server overview

Published in: Technology
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... ,DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ,DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ,DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ,DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ,DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ,DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/yxufevpm } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Traffic server overview

  1. 1. Traffic Server 介简 淘宝网 -- 核心系 研 :千石统 发 qianshi@taobao.com http://www.flyinfo.net
  2. 2. Agenda • 功能概览 • 架构 & 模型 • Plugin 开发 • 配置 CDN
  3. 3. TS 何物为 • Apache Traffic Server™ is fast, scalable and extensible HTTP/1.1 compliant caching proxy server.
  4. 4. 回首 去过
  5. 5. 功能概览 • web 代理 存缓 • 反向代理 • 多 存级缓
  6. 6. 存命中缓
  7. 7. 存未命中缓
  8. 8. 反向代理
  9. 9. 多 存级缓
  10. 10. 并发问题 • C10k – http://www.kegel.com/c10k.html • C10k-C500k – http://www.dbanotes.net/arch/c10k_c500k.html • C1000k – http://www.slideshare.net/mryufeng/c1000k • 解决之道 – 步事件 理异 处 – CPU 多核支持
  11. 11. 步事件 理异 处
  12. 12. CPU 多核支持
  13. 13. 架构 • 多 程 步状 机线 异 态 – 每个 听端口 建监 创 accept 程线 – 每个 core 分配 2-3 个 程线 – 独立的 程 理 控和日志线 处 监 – 每个活 的 求 持状 机跃 请 维 态 • 支持 Plugins – 在状 机的不同 段 行态 阶 进 Hook – 其他 的支持(协议 NNTP, streaming, FTP )
  14. 14. 架构
  15. 15. 架构
  16. 16. 程模型线
  17. 17. 同类比较 ATS HAProxy nginx Squid Varnish Work Threads  X X X  Multi-process X #  #  Event-driven     X Plugin APIs  X # # # Forward proxy  X X  X Reverse proxy      Transp. proxy #    X Load Balancer      Cache  X    ESI  X X   ICP  X X  X Keep-Alive  X    SSL  X   X Pipeline  X   X
  18. 18. Plugin 开发
  19. 19. Plugin 例子
  20. 20. Http 状态转换 Hook
  21. 21. Http 状态转换 Hook
  22. 22. 配置 CDN CONFIG proxy.config.http.server_port INT 80 CONFIG proxy.config.reverse_proxy.enabled INT 1 CONFIG proxy.config.url_remap.remap_required INT 1 map http://cdn.example.com/img http://img.example.com reverse_map http://img.example.com http://cdn.example.com/img map http://cdn.example.com/js http://js.example.com reverse_map http://js.example.com http://cdn.example.com/js map http://cdn.example.com/css http://css.example.com reverse_map http://css.example.com http://cdn.exampe.com/css records.config remap.config
  23. 23. 更多信息 • http://www.flyinfo.net/category/traffic- server/
  24. 24. 参考文献 • https://cwiki.apache.org/TS/traffic- server.html • Traffic Server Meetup, ApacheCon 2009. • Leif Hedstrom, Apache Traffic Server - HTTP Proxy Server on the Edge, Velocity 2010. • Leif Hedstrom, Driving Apache Traffic Server, OSCON 2010.
  25. 25. Thank you! Any question?

×