Apache Traffic Server Internals

20
Apache Traffic Server Internals Phil Sorber - Comcast

description

 

Transcript of Apache Traffic Server Internals

Page 1: Apache Traffic Server Internals

Apache Traffic Server Internals

Phil Sorber - Comcast

Page 2: Apache Traffic Server Internals

How I learned to stop worrying and love ATS

Page 3: Apache Traffic Server Internals

About Me

(Why you should listen to me) •  Principal Engineer @ Comcast on IpCDN team •  Committer to ATS •  Generally cool guy [citation needed]

Page 4: Apache Traffic Server Internals

About This Talk

(Why you shouldn’t leave just yet) •  CPU •  Memory •  Storage •  Network •  Abstractions

Page 5: Apache Traffic Server Internals

A brief History

•  Inktomi (1996) •  Yahoo! (2002) •  Apache Incubator (2009) •  Apache TLP (2010)

Page 6: Apache Traffic Server Internals

CPU

•  Multi-Threaded •  Asynchronous •  Event Driven •  Continuations •  CPU Affinity (NUMA)

Page 7: Apache Traffic Server Internals

CPU

(continued)

Page 8: Apache Traffic Server Internals

CPU

(continued) •  Thread Types

§  Net §  AIO §  Task §  Accept §  SSL §  DNS §  Remap §  Plugins can also do thread things

Page 9: Apache Traffic Server Internals

Memory

•  RAM Cache (not RAM disks) •  NUMA! NUMA! •  Freelists

§  Allocators §  ClassAllocators (Global with atomics) §  ProxyAllocators (Thread) §  Arenas

•  Huge Pages?

Page 10: Apache Traffic Server Internals

Memory

(continued)

Head

Version

Next Next Next

Page 11: Apache Traffic Server Internals

Memory

(continued)

Socket 1 Socket 2

Page 12: Apache Traffic Server Internals

Storage

•  Raw Devices •  Unique Caches •  Distinct RAM Caches •  Consistent Hashing •  Circular Cache

Page 13: Apache Traffic Server Internals

Storage

(continued)

Vol 1 Vol 5 Vol 4 Vol 3 Vol 2

RC

Consistent Hash

RC RC RC RC

Page 14: Apache Traffic Server Internals

Storage

(continued)

Vol 1 Vol 5 Vol 4 Vol 3 Vol 2

RC

Consistent Hash

RC RC RC RC

Page 15: Apache Traffic Server Internals

Network

•  Connection Pools •  Tiered Caches •  Parent Selection

Page 16: Apache Traffic Server Internals

Network

(continued) Origin

Mid 2

Mid 1

Edge 2

Edge 3

Edge 1

Client 1

Client 2

Client 3

Client 4

Edge 4

Client 5

Client 6

Page 17: Apache Traffic Server Internals

Network

(continued) Origin

Mid 2

Mid 1

Edge 2

Edge 3

Edge 1

Client 1

Client 2

Client 3

Client 4

Edge 4

Client 5

Client 6

Page 18: Apache Traffic Server Internals

Abstractions

•  Processors §  HostDB §  DNS §  Net §  SSL §  Cache §  Remap

•  State Machines •  Clustering

Page 19: Apache Traffic Server Internals

Abstractions

(continued)

Page 20: Apache Traffic Server Internals

Questions?

Seriously, ask some.

•  Phil Sorber •  [email protected] •  @PhilSorber •  http://trafficserver.apache.org •  #traffic-server on freenode (PSUdaemon)