Apache Traffic Server HTTP Proxy Server on the

  • Slides: 34
Download presentation
Apache Traffic Server HTTP Proxy Server on the Edge Leif Hedstrom Engineer leif@yahoo-inc. com

Apache Traffic Server HTTP Proxy Server on the Edge Leif Hedstrom Engineer leif@yahoo-inc. com zwoop@apache. org

Agenda § History and background of Traffic Server § Brief introduction to HTTP intermediaries

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

Origins of the software

Open Source benefits

Open Source benefits

Forward Proxy

Forward Proxy

Reverse Proxy

Reverse Proxy

Intercepting Proxy

Intercepting Proxy

The concurrency problem

The concurrency problem

Solution 1: Multithreading

Solution 1: Multithreading

Problems with multi-threading

Problems with multi-threading

Solution 2: Event Processing

Solution 2: Event Processing

Problems with event processors

Problems with event processors

Traffic Server threads model

Traffic Server threads model

Plenty of FOSS Proxy Servers

Plenty of FOSS Proxy Servers

Choosing an intermediary

Choosing an intermediary

SMP Scalability and performance

SMP Scalability and performance

Traffic Server performance § 350, 000 requests / sec in production CDN - 30

Traffic Server performance § 350, 000 requests / sec in production CDN - 30 Gbps / second § Max capacity is at least 10 x normal usage, to deal with massive spikes. § 85, 000 requests / sec with small content out of cache, for a single (lab)box § 3. 6 Gbps out of a single box, with larger content (4 x Gig. E NIC bonded) (all numbers from Y! CDN and lab testing).

HTTP/1. 1 Features

HTTP/1. 1 Features

Ease of use, extensible

Ease of use, extensible

Traffic Server making Ops easy § Traffic Server will restart automatically if it crashes

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

Example evaluation sheet ATS HAproxy nginx Squid Varnish mod_proxy Worker Threads Y N N N Y Y Multi-Process N Y Y Event-driven Y Y N N? Plugin APIs Y N Y part Y Y Forward Proxy Y N N Y Reverse Proxy Y Y Y Transp. Proxy N Y Y Y N N Load Balancer part Y! Y Y Y N Y Y ESI soon N N Y Y N ICP Y N N Keep-Alive Y N Y Y SSL Y N Y Pipeline Y N Y Cache

Operations is important!

Operations is important!

Yahoo! Traffic Server Use Cases

Yahoo! Traffic Server Use Cases

Content Delivery Network

Content Delivery Network

CDN on the Edge

CDN on the Edge

Traffic Server CDN configuration CONFIG proxy. config. http. server_port INT 80 CONFIG proxy. config.

Traffic Server CDN configuration CONFIG proxy. config. http. server_port INT 80 CONFIG proxy. config. cache. ram_cache. size INT 512 MB CONFIG proxy. config. url_remap_required INT 1 map http: //cdn. example. com/js 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/sd 2

Common enemies of performance

Common enemies of performance

TCP 3 -way Handshake

TCP 3 -way Handshake

Congestion avoidance

Congestion avoidance

TCP Connection Management

TCP Connection Management

Why Server Load Balancers?

Why Server Load Balancers?

Server Load Balancer

Server Load Balancer

Executive Summary § Understand your requirements § Evaluate available solutions § Building a CDN

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

trafficserver. apache. org