1 / 41

Driving Apache Traffic Server

Driving Apache Traffic Server. Leif Hedstrom Engineer, Yahoo Inc. leif@ogre.com zwoop@apache.org @zwoop. http://www.flickr.com/photos/zackbrescia/3292033740/. History and introduction to intermediaries Configuration Use cases. Origins of the software. Forward Proxy. Reverse Proxy.

amish
Télécharger la présentation

Driving Apache Traffic Server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Driving Apache Traffic Server • Leif Hedstrom • Engineer, Yahoo Inc. • leif@ogre.com • zwoop@apache.org • @zwoop

  2. http://www.flickr.com/photos/zackbrescia/3292033740/

  3. History and introduction to intermediaries Configuration Use cases

  4. Origins of the software

  5. Forward Proxy

  6. Reverse Proxy

  7. Intercepting Proxy

  8. Plenty of FOSS Proxy Servers

  9. Choosing an intermediary

  10. SMP Scalability and performance

  11. Traffic Server threads model

  12. Traffic Server performance • 350,000 requests / sec in production CDN • 30 Gbps / second (95-percentile) • Many more request handled for HTML • 105,000 requests / sec with small content out of cache, for a single (lab) box • 3.6Gbps out of a single box, with larger content (4x GigE NIC bonded) (all numbers from Y! CDN and lab testing).

  13. HTTP/1.1 Features

  14. Ease of use, extensible

  15. http://www.flickr.com/photos/stuartpilbrow/3345896050/

  16. Traffic Server making Ops easy • Traffic Server will restart automatically if it crashes • Traffic Server will kill itself if it isn’t responding • Traffic Server can reload most configurations without server restarts • Adding plugins is a matter of dropping in the shared object, and restarting • Stats and configurations are accessible via command line utilities

  17. Configurations

  18. plugin.config records.config partition.config hosting.config cache.config update.config ip_allow.config storage.config logs_xml.config parent.config remap.config icp.config

  19. records.config storage.config remap.config

  20. Critical in records.config CONFIG proxy.config.exec_thread.autoconfig INT 1 CONFIG proxy.config.exec_thread.autoconfig.scale FLOAT 2.0 CONFIG proxy.config.exec_thread.limit INT 2 CONFIG proxy.config.http.server_port INT 8080 CONFIG proxy.config.http.cache.http INT 1 CONFIG proxy.config.cache.ram_cache.size INT 512M CONFIG proxy.config.reverse_proxy.enabled INT 1 CONFIG proxy.config.url_remap.remap_required INT 1 CONFIG proxy.config.url_remap.pristine_host_hdr INT 0 CONFIG proxy.config.ssl.enabled INT 0 CONFIG proxy.config.ssl.server.cert.filename STRING server.pem

  21. CONFIG proxy.config.url_remap.remap_required INT 1

  22. CONFIG proxy.config.url_remap.remap_required INT 0

  23. QUICK DEMO

  24. Use Case: Content Delivery Network

  25. CDN on the Edge

  26. Traffic Server CDN configuration CONFIG proxy.config.http.server_port INT 80CONFIG proxy.config.cache.ram_cache.size INT 4096M CONFIG proxy.config.url_remap.remap_required INT 1 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 map http://cdn.example.com/img http://img.example.com reverse_map http://img.example.com http://cdn.example.com/img /dev/sd2

  27. Common enemies of performance

  28. TCP 3-way Handshake

  29. Congestion avoidance

  30. Use case: TCP Connection Management

  31. ATS Connection mgmt configuration CONFIG proxy.config.http.server_port INT 80CONFIG proxy.config.cache.ram_cache.size INT 0 CONFIG proxy.config.url_remap.remap_required INT 1 CONFIG proxy.config.http.send_http11_requests INT 1 CONFIG proxy.config.http.share_server_sessions INT 1 CONFIG proxy.config.http.server_max_connections INT 2000 CONFIG proxy.config.http.keep_alive_no_activity_timeout_out INT 60 CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 60 map http://www.example.com/ http://real-www.example.com

  32. Executive Summary • Understand your requirements • Evaluate available solutions • Building a CDN is easy • Apache Traffic Server is • Fast and SMP scalable • HTTP/1.1 compliant • Battle hardened • Easy to configure and manage • Actively developed • Free as in beer

  33. trafficserver.apache.org

  34. The concurrency problem

  35. Solution 1: Multithreading

  36. Problems with multi-threading

  37. Solution 2: Event Processing

  38. Problems with event processors

More Related