Velocity 2010 - ATS
-
Upload
leif-hedstrom -
Category
Technology
-
view
2.174 -
download
0
description
Transcript of Velocity 2010 - ATS
Apache Traffic ServerHTTP Proxy Server on the Edge
Leif HedstromEngineer
[email protected]@apache.org
Agenda
History and background of Traffic Server
Brief introduction to HTTP intermediaries
Concurrency problems (and solutions)
Choosing an intermediary
Building a CDN
TCP connection management
Server Load Balancer (if time permits)
Origins of the software
Open Source benefits
Forward Proxy
Reverse Proxy
Intercepting Proxy
The concurrency problem
Solution 1: Multithreading
Problems with multi-threading
Solution 2: Event Processing
Problems with event processors
Traffic Server threads model
Plenty of FOSS Proxy Servers
Choosing an intermediary
SMP Scalability and performance
Traffic Server performance
350,000 requests / sec in production CDN- 30 Gbps / second
Max capacity is at least 10x normal usage, to deal with massive spikes.
85,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).
HTTP/1.1 Features
Ease of use, extensible
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
Example evaluation sheet
ATS HAproxy nginx Squid Varnish mod_proxy
Worker Threads Y N N N Y Y
Multi-Process N Y Y N Y Y
Event-driven Y Y Y Y N N?
Plugin APIs Y N Y part Y Y
Forward Proxy Y N N Y N Y
Reverse Proxy Y Y Y Y Y Y
Transp. Proxy N Y Y Y N N
Load Balancer part Y! Y Y Y Y
Cache Y N Y Y Y Y
ESI soon N N Y Y N
ICP Y N N Y N N
Keep-Alive Y N Y Y Y Y
SSL Y N Y Y N Y
Pipeline Y N Y Y N Y
Operations is important!
Yahoo! Traffic Server Use Cases
Content Delivery Network
CDN on the Edge
Traffic Server CDN configuration
CONFIG proxy.config.http.server_port INT 80CONFIG proxy.config.cache.ram_cache.size INT 512MBCONFIG proxy.config.url_remap.remap_required INT 1
map http://cdn.example.com/js http://js.example.comreverse_map http://js.example.com http://cdn.example.com/js
map http://cdn.example.com/css http://css.example.comreverse_map http://css.example.com http://cdn.exampe.com/css
map http://cdn.example.com/img http://img.example.comreverse_map http://img.example.com http://cdn.example.com/img
/dev/sd2
Common enemies of performance
TCP 3-way Handshake
Congestion avoidance
TCP Connection Management
Why Server Load Balancers?
Server Load Balancer
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 operate
- Actively developed
- Free as in beer
trafficserver.apache.org