apache traffic server

34
Apache Traffic Server HTTP Proxy Server on the Edge Leif Hedstrom Engineer [email protected] [email protected]

Upload: ketan

Post on 08-Jan-2016

74 views

Category:

Documents


0 download

DESCRIPTION

Apache Traffic Server. HTTP Proxy Server on the Edge Leif Hedstrom Engineer [email protected] [email protected]. Agenda. History and background of Traffic Server Brief introduction to HTTP intermediaries Concurrency problems (and solutions) Choosing an intermediary Building a CDN - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Apache Traffic Server

Apache Traffic ServerHTTP Proxy Server on the Edge

Leif HedstromEngineer

[email protected]@apache.org

Page 2: Apache Traffic Server

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)

Page 3: Apache Traffic Server

Origins of the software

Page 4: Apache Traffic Server

Open Source benefits

Page 5: Apache Traffic Server

Forward Proxy

Page 6: Apache Traffic Server

Reverse Proxy

Page 7: Apache Traffic Server

Intercepting Proxy

Page 8: Apache Traffic Server

The concurrency problem

Page 9: Apache Traffic Server

Solution 1: Multithreading

Page 10: Apache Traffic Server

Problems with multi-threading

Page 11: Apache Traffic Server

Solution 2: Event Processing

Page 12: Apache Traffic Server

Problems with event processors

Page 13: Apache Traffic Server

Traffic Server threads model

Page 14: Apache Traffic Server

Plenty of FOSS Proxy Servers

Page 15: Apache Traffic Server

Choosing an intermediary

Page 16: Apache Traffic Server

SMP Scalability and performance

Page 17: Apache Traffic Server

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).

Page 18: Apache Traffic Server

HTTP/1.1 Features

Page 19: Apache Traffic Server

Ease of use, extensible

Page 20: Apache Traffic Server

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

Page 21: Apache Traffic Server

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

Page 22: Apache Traffic Server

Operations is important!

Page 23: Apache Traffic Server

Yahoo! Traffic Server Use Cases

Page 24: Apache Traffic Server

Content Delivery Network

Page 25: Apache Traffic Server

CDN on the Edge

Page 26: Apache Traffic Server

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

Page 27: Apache Traffic Server

Common enemies of performance

Page 28: Apache Traffic Server

TCP 3-way Handshake

Page 29: Apache Traffic Server

Congestion avoidance

Page 30: Apache Traffic Server

TCP Connection Management

Page 31: Apache Traffic Server

Why Server Load Balancers?

Page 32: Apache Traffic Server

Server Load Balancer

Page 33: Apache Traffic Server

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

Page 34: Apache Traffic Server

trafficserver.apache.org