apache con 2011 gd
DESCRIPTION
My ApacheCon 2011 presentation. I you someone liked it.TRANSCRIPT
![Page 1: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/1.jpg)
Out and About with Apache Traffic Server
Leif HedstromNovember 2011
![Page 2: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/2.jpg)
Who am I?
• One of the drivers to open source Traffic Server (at Yahoo)
• Committer for Apache Traffic Server• VP of Apache Traffic Server PMC• ASF member• Go Daddy’s Principal Architect for Hosting
[email protected]@zwoop+zwoop
![Page 3: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/3.jpg)
History of Traffic Server
![Page 4: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/4.jpg)
Plenty of FOSS Proxy Servers
![Page 5: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/5.jpg)
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 sometimes Y
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 Y Y N Y N N
Load Balancer weak Y Y Y Y Y
Persistent Cache Y N Y Y sorta Y
ESI Y N N Y kinda 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
Features
![Page 6: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/6.jpg)
Mandatory useless benchmark …
![Page 7: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/7.jpg)
Less useless benchmark …
![Page 8: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/8.jpg)
Intermediaries - Forward Proxy
![Page 9: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/9.jpg)
Intermediaries - Reverse Proxy
![Page 10: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/10.jpg)
Intermediaries - Intercepting Proxy
![Page 11: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/11.jpg)
Common enemies of performance
3-Way handshake
Congestion control
DNS lookups
![Page 12: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/12.jpg)
Common enemies of performance
3-Way handshake
Congestion control
DNS lookups
![Page 13: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/13.jpg)
TCP 3-way Handshake
![Page 14: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/14.jpg)
Common enemies of performance
3-Way handshake
Congestion control
DNS lookups
![Page 15: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/15.jpg)
Congestion control
![Page 16: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/16.jpg)
Common enemies of performance
3-Way handshake
Congestion control
DNS lookups
![Page 17: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/17.jpg)
http://news.example.com/http://finance.example.com/http://groups.example.com/
![Page 18: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/18.jpg)
http://news.example.com/http://finance.example.com/http://groups.example.com/
vshttp://www.example.com/newshttp://www.example.com/financehttp://www.example.com/groups
![Page 19: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/19.jpg)
The concurrency problem
![Page 20: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/20.jpg)
Solution 1: Multithreading
![Page 21: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/21.jpg)
Problems with multi-threading
![Page 22: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/22.jpg)
Solution 2: Event Processing
![Page 23: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/23.jpg)
Problems with event processors
![Page 24: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/24.jpg)
Traffic Server threads model
![Page 25: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/25.jpg)
http://www.flickr.com/photos/stuartpilbrow/3345896050/
![Page 26: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/26.jpg)
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
![Page 27: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/27.jpg)
records.config
storage.config
remap.config
![Page 28: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/28.jpg)
records.config for reverse proxyCONFIG proxy.config.http.server_port INT 80
CONFIG proxy.config.cache.ram_cache.size INT 1GCONFIG proxy.config.cache.ram_cache_cutoff INT 1MCONFIG proxy.config.reverse_proxy.enabled INT 1CONFIG proxy.config.url_remap.remap_required INT 1CONFIG proxy.config.url_remap.pristine_host_hdr INT 0CONFIG proxy.config.http.negative_caching_enabled INT 1CONFIG proxy.config.http.negative_caching_lifetime INT 120CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1CONFIG proxy.config.http.normalize_ae_gzip INT 1
![Page 29: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/29.jpg)
records.config for reverse proxyCONFIG proxy.config.http.server_port INT 80
CONFIG proxy.config.cache.ram_cache.size INT 1GCONFIG proxy.config.cache.ram_cache_cutoff INT 1MCONFIG proxy.config.reverse_proxy.enabled INT 1CONFIG proxy.config.url_remap.remap_required INT 1CONFIG proxy.config.url_remap.pristine_host_hdr INT 0CONFIG proxy.config.http.negative_caching_enabled INT 1CONFIG proxy.config.http.negative_caching_lifetime INT 120CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1CONFIG proxy.config.http.normalize_ae_gzip INT 1
![Page 30: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/30.jpg)
records.config for forward proxyCONFIG proxy.config.http.server_port INT 8080
CONFIG proxy.config.cache.ram_cache.size INT 1GCONFIG proxy.config.cache.ram_cache_cutoff INT 1MCONFIG proxy.config.reverse_proxy.enabled INT 0CONFIG proxy.config.url_remap.remap_required INT 0CONFIG proxy.config.url_remap.pristine_host_hdr INT 0CONFIG proxy.config.http.negative_caching_enabled INT 1CONFIG proxy.config.http.negative_caching_lifetime INT 120CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1CONFIG proxy.config.http.normalize_ae_gzip INT 1
![Page 31: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/31.jpg)
remap.config examples
map http://www.example.com/css http://css.example.commap http://www.example.com http://real.example.comreverse_map http://real.example.com http://www.example.com
redirect http://example.com http://www.example.com
regex_map http://(.*)\.example.com http://o.example.com/$1
map / http://kitchensink.example.com
![Page 32: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/32.jpg)
remap.config examples
map http://www.example.com/css http://css.example.commap http://www.example.com http://real.example.comreverse_map http://real.example.com http://www.example.com
redirect http://example.com http://www.example.com
regex_map http://(.*)\.example.com http://o.example.com/$1
map / http://kitchensink.example.com
![Page 33: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/33.jpg)
remap.config examples
map http://www.example.com/css http://css.example.commap http://www.example.com http://real.example.comreverse_map http://real.example.com http://www.example.com
redirect http://example.com http://www.example.com
regex_map http://(.*)\.example.com http://o.example.com/$1
map / http://kitchensink.example.com
![Page 34: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/34.jpg)
remap.config examples
map http://www.example.com/css http://css.example.commap http://www.example.com http://real.example.comreverse_map http://r.example.com http://www.example.com
redirect http://example.com http://www.example.com
regex_map http://(.*)\.example.com http://o.example.com/$1
map / http://kitchensink.example.com
![Page 35: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/35.jpg)
remap.config examples
map http://www.example.com/css http://css.example.commap http://www.example.com http://real.example.comreverse_map http://r.example.com http://www.example.com
redirect http://example.com http://www.example.com
regex_map http://(.*)\.example.com http://o.example.com/$1
map / http://kitchensink.example.com
![Page 36: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/36.jpg)
Some interesting features
RAM: Optional compression–Various compression levels supported–Very fast (virtually no overhead using the faster algo)
RAM: Several cache eviction algorithms–CLFUS algorithm avoids the classic problem on an LRU during “scans”▫ And it’s not encumbered by any patents
Disk: Supports various block sizes (SSD)Disk: Can be tuned for various object sizesDisk: No file system overhead (RAW disks)
![Page 37: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/37.jpg)
Future directions
Release early, and oftenFull IPv6 supportNPN, SNI and other SSL improvementsImproved memory management, support debug features in e.g. jemalloc and tcmalloc
Optimizations for SSD (“stacked” caches)
More focus on plugins, and plugin APIs–Hopefully a real load balancer plugin!
![Page 38: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/38.jpg)
Was this a huge waste of time, or?
http://www.flickr.com/photos/simpologist/16734948/
![Page 39: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/39.jpg)
39
A versatile tool
http://www.flickr.com/photos/airosan/2232394342/
![Page 40: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/40.jpg)
40
Yes, it’s fast, ridiculously fast
![Page 41: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/41.jpg)
41
A vibrant community!
![Page 42: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/42.jpg)
42
“If you are not using SSDs, you are wasting your life”
Artur Bergman
![Page 43: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/43.jpg)
43
“If you are not using SSDs, you are wasting your life”
Artur Bergman
“If you are not using a caching proxy server, you are wasting your SSDs”
me
![Page 44: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/44.jpg)
44
![Page 45: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/45.jpg)
Four Horseman of Bad Performance
–Data copies–Context Switches–Memory allocation–Lock contention
–Avoid these!
http://pl.atyp.us/content/tech/servers.html
![Page 46: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/46.jpg)
records.config for reverse proxyCONFIG proxy.config.http.server_port INT 80
CONFIG proxy.config.cache.ram_cache.size INT 1GCONFIG proxy.config.cache.ram_cache_cutoff INT 1MCONFIG proxy.config.reverse_proxy.enabled INT 1CONFIG proxy.config.url_remap.remap_required INT 1CONFIG proxy.config.url_remap.pristine_host_hdr INT 0CONFIG proxy.config.http.negative_caching_enabled INT 1CONFIG proxy.config.http.negative_caching_lifetime INT 120CONFIG proxy.config.http.cache.ignore_client_cc_max_age INT 1CONFIG proxy.config.http.normalize_ae_gzip INT 1
![Page 47: Apache con 2011 gd](https://reader035.vdocuments.net/reader035/viewer/2022070313/554bcfdeb4c905706a8b4b72/html5/thumbnails/47.jpg)
Disk cache: “Cyclone”
http://www.flickr.com/photos/gsfc/4461843139/