SlideShare a Scribd company logo
An introduction to Apache
         Traffic Server


Leif Hedstrom
December 2011
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

                   zwoop@apache.org
                    @zwoop
                    +zwoop
History of Traffic Server


          Inkt omi          Yahoo            A pache
       T raffic Server   T raffic Server   T raffic Server




1995           2000         2005             2010
Plenty of FOSS Proxy Servers
Features
                   ATS    HAproxy   ngin   Squid    Varnish    mod_proxy
                                     x
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                soon     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
Mandatory useless benchmark …

              120,000

              100,000

               80,000
 Throughput




               60,000

               40,000

               20,000

                   0
                        ATS 2.1.9       Nginx 0.8.53   Varnish 2.1.5

                                    Req / sec
Less useless benchmark …
             120,000                                                       4.0
                                                                           3.5
             100,000




                                                                                 Time to firt res p onse
                                                                           3.0
              80,000
Throughput




                                                                           2.5
              60,000                                                       2.0




                                                                                       s
                                                                           1.5
              40,000
                                                                           1.0
              20,000
                                                                           0.5
                  0                                                        0.0
                       ATS 2.1.9          Nginx 0.8.53     Varnish 2.1.5

                                   Req / sec      Latency (ms)
Intermediaries - Forward Proxy
Intermediaries - Reverse Proxy
Intermediaries - Intercepting Proxy
Web Cash?




            http://www.flickr.com/photos/amagill/3366720659/
No, Web Cache!




           http://www.flickr.com/photos/dglazkov/287092560/
Common enemies of performance

3-Way handshake

     Congestion control

            DNS lookups
Common enemies of performance

3-Way handshake
TCP 3-way Handshake
Common enemies of performance




     Congestion control
Congestion control
Common enemies of performance




            DNS lookups
http://news.example.com/
http://finance.example.com/
http://groups.example.com/
vs
http://www.example.com/news
http://www.example.com/finance
http://www.example.com/groups
The concurrency problem
Solution 1: Multithreading

       Single CPU               Dual CPU

       Thread 1            Thread 1        Thread 2

                                             Thread 3
            Thread 2
                           Thread 1

              Thread 3
                                Thread 3
       Thread 1



              Thread 3




     Time                Time
Problems with multi-threading


      "When two trains approach each other at a
       crossing, both shall come to a full stop
        and neither shall start up again until
                the other has gone."

      From Wikipedia, Illogical statute passed by Kansas legislation .
Solution 2: Event Processing
         Scheduled        Network       Disk I/O
          events           events       events




                           Queue




                        Event
                        Loop

         Disk            HTTP state         Accept
        handler           machine           handler




                  Can generate new events
Problems with event processors
Asynchronous event processor

                                   Asynchronous event processor




   RAM cache
                                               ...
                                                                  n threads per core




                                   Asynchronous event processor




   Disk cache
                                          Disk I/O thread

                                          Disk I/O thread
                                               ...
                                                                  m threads per disk




                                          Disk I/O thread
                Shared Resources

 Configs
Reloadable




                                     Accept threads (per port)

                                         Logging threads
                                                                                       Traffic Server threads model




   etc.
Stats, logs
                                                                        ~10 threads




                                      Various "admin" threads
http://www.flickr.com/photos/stuartpilbrow/3345896050
plugin.config      ip_allow.config
records.config     storage.config
partition.config   logs_xml.config
hosting.config     parent.config
cache.config       remap.config
update.config      icp.config
Usenix lisa 2011
records.config for reverse proxy
CONFIG proxy.config.http.server_port INT 80
CONFIG proxy.config.cache.ram_cache.size INT 1G
CONFIG proxy.config.cache.ram_cache_cutoff INT 1M
CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.remap_required INT 1
CONFIG proxy.config.url_remap.pristine_host_hdr INT 0
CONFIG proxy.config.http.negative_caching_enabled INT 1
CONFIG proxy.config.http.negative_caching_lifetime INT 120
CONFIG proxy.config.http.cache.ignore_client_cc_max_age
INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 1
records.config for reverse proxy
CONFIG proxy.config.http.server_port INT 80



CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.remap_required INT 1
records.config for forward proxy
CONFIG proxy.config.http.server_port INT 8080



CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.url_remap.remap_required INT 0
remap.config examples
map http://www.example.com/css http://css.example.com
map http://www.example.com http://real.example.com
reverse_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
remap.config examples
map http://www.example.com/css http://css.example.com
map http://www.example.com http://real.example.com
remap.config examples


reverse_map http://real.example.com http://www.example.com
remap.config examples




regex_map http://(.*).example.com http://o.example.com/$1
remap.config examples




map / http://kitchensink.example.com
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”
Disk: Supports various block sizes (SSD)
Disk: Can be tuned for various object sizes
Disk: No file system overhead (RAW disks)
Future directions
Release early, and often
Full IPv6 support
NPN, SNI and other SSL improvements
Improved 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!
Was this a huge waste of time, or?




             http://www.flickr.com/photos/simpologist/16734948/
A versatile tool




               http://www.flickr.com/photos/airosan/2232394342/
                                                              41
Yes, it’s fast, ridiculously fast




                                    42
A vibrant community!




            The
                  Apache
Software Foundation
http://www.apache.org/



                         43
Artur Bergman tells us if we’re
 not using SSD drives, we’re
       wasting our lives.
I’d say, if you are not using a
caching proxy, you’re wasting
           your SSDs!
46
Contact me




             47
records.config for reverse proxy




CONFIG proxy.config.http.cache.ignore_client_cc_max_age
INT 1
CONFIG proxy.config.http.normalize_ae_gzip INT 1
Four Horseman of Bad Performance
–Data copies
–Context Switches
–Memory allocation
–Lock contention




–Avoid these!

                 http://pl.atyp.us/content/tech/servers.html
Disk cache: “Cyclone”

More Related Content

PPT
Oscon 2010 - ATS
PPT
Velocity 2010 - ATS
PPT
Apache Traffic Server
PDF
ReplacingSquidWithATS
PDF
Apache Traffic Server & Lua
PDF
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
PDF
Building your own CDN using Amazon EC2
PPTX
Usenix LISA 2012 - Choosing a Proxy
Oscon 2010 - ATS
Velocity 2010 - ATS
Apache Traffic Server
ReplacingSquidWithATS
Apache Traffic Server & Lua
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Building your own CDN using Amazon EC2
Usenix LISA 2012 - Choosing a Proxy

What's hot (20)

PDF
Caching with Memcached and APC
PPTX
PHP Performance with APC + Memcached
ODP
Improving PHP Application Performance with APC
PPT
Find bottleneck and tuning in Java Application
PDF
Varnish Configuration Step by Step
PPTX
Apache Performance Tuning: Scaling Up
PDF
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
PPTX
Peter Zaitsev "18 ways to fix MySQL bottlenecks"
PDF
Anton Moldovan "Building an efficient replication system for thousands of ter...
ODP
Apc presentation
PDF
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
PDF
[245] presto 내부구조 파헤치기
PPTX
Choosing A Proxy Server - Apachecon 2014
PDF
High Concurrency Architecture and Laravel Performance Tuning
PDF
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
PPTX
How to optimize CloudLinux OS limits
PDF
초보자를 위한 분산 캐시 이야기
PPTX
vSphere vStorage: Troubleshooting Performance
PDF
Troubleshooting redis
PDF
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
Caching with Memcached and APC
PHP Performance with APC + Memcached
Improving PHP Application Performance with APC
Find bottleneck and tuning in Java Application
Varnish Configuration Step by Step
Apache Performance Tuning: Scaling Up
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
Peter Zaitsev "18 ways to fix MySQL bottlenecks"
Anton Moldovan "Building an efficient replication system for thousands of ter...
Apc presentation
Kafka Summit SF 2017 - One Day, One Data Hub, 100 Billion Messages: Kafka at ...
[245] presto 내부구조 파헤치기
Choosing A Proxy Server - Apachecon 2014
High Concurrency Architecture and Laravel Performance Tuning
Integrating multiple CDN providers at Etsy - Velocity Europe (London) 2013
How to optimize CloudLinux OS limits
초보자를 위한 분산 캐시 이야기
vSphere vStorage: Troubleshooting Performance
Troubleshooting redis
[오픈소스컨설팅] EFK Stack 소개와 설치 방법
Ad

Viewers also liked (20)

PPTX
Apache con 2011 gd
PPT
Introduction to karen bloomfield
PPTX
Rit 2011 ats
PDF
Traffic Server を使ってみた
PPT
Traffic server overview
PDF
Name one gay club/bar for each of these global cities? And a little descripti...
PPT
Prospectiva Universitaria en Venezuela
PDF
Eman Jaheen Resume 2(1)- e.jaheen@outlook
PDF
Pal oil mill machines
PPTX
Vetbiz smart technology tools
DOC
Story To Reflect Upon 25,26
PPTX
11.4
PDF
Media Monitoring als Erfolgsfaktor - Beispiel M-Adaptive
PDF
Conor2011
PDF
Informatica bb 2011
PDF
Car one magazine_ Invierno 2012
PPTX
Presentación Pacto de Socios para certificado de profesionalidad
PPTX
Biomarker Analyst_Presentation_For_Client
PPTX
Semana 2 actividad 2.2 función de un lms - josé jaime ruiz - ges
PPTX
Mise en œuvre d’une solution biométrique d’authentification forte
Apache con 2011 gd
Introduction to karen bloomfield
Rit 2011 ats
Traffic Server を使ってみた
Traffic server overview
Name one gay club/bar for each of these global cities? And a little descripti...
Prospectiva Universitaria en Venezuela
Eman Jaheen Resume 2(1)- e.jaheen@outlook
Pal oil mill machines
Vetbiz smart technology tools
Story To Reflect Upon 25,26
11.4
Media Monitoring als Erfolgsfaktor - Beispiel M-Adaptive
Conor2011
Informatica bb 2011
Car one magazine_ Invierno 2012
Presentación Pacto de Socios para certificado de profesionalidad
Biomarker Analyst_Presentation_For_Client
Semana 2 actividad 2.2 función de un lms - josé jaime ruiz - ges
Mise en œuvre d’une solution biométrique d’authentification forte
Ad

Similar to Usenix lisa 2011 (20)

PDF
Varnish Cache
PDF
Varnish, The Good, The Awesome, and the Downright Crazy.
PDF
Varnish, The Good, The Awesome, and the Downright Crazy
PDF
Fisl - Deployment
PDF
Deployment de Rails
PDF
Varnish Cache - International PHP Conference Fall 2012
PDF
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
PDF
Cold Hard Cache
PDF
Non-blocking I/O, Event loops and node.js
PDF
Everyday tools and tricks for scaling Node.js
PPTX
vert.x - asynchronous event-driven web applications on the JVM
PDF
Optimizing wordpress
PDF
Reactive Summit 2017 Highlights!
KEY
Embrace NoSQL and Eventual Consistency with Ripple
PDF
TorqueBox at DC:JBUG - November 2011
PPTX
Building WebSocket and Server Side Events Applications using Atmosphere
PDF
Supercharging Cassandra - GOTO Amsterdam
PPT
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
PPTX
Open stack in sina
ODP
Virtual Network Performance Challenge
Varnish Cache
Varnish, The Good, The Awesome, and the Downright Crazy.
Varnish, The Good, The Awesome, and the Downright Crazy
Fisl - Deployment
Deployment de Rails
Varnish Cache - International PHP Conference Fall 2012
Asynchronous Architectures for Implementing Scalable Cloud Services - Evan Co...
Cold Hard Cache
Non-blocking I/O, Event loops and node.js
Everyday tools and tricks for scaling Node.js
vert.x - asynchronous event-driven web applications on the JVM
Optimizing wordpress
Reactive Summit 2017 Highlights!
Embrace NoSQL and Eventual Consistency with Ripple
TorqueBox at DC:JBUG - November 2011
Building WebSocket and Server Side Events Applications using Atmosphere
Supercharging Cassandra - GOTO Amsterdam
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Open stack in sina
Virtual Network Performance Challenge

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Digital-Transformation-Roadmap-for-Companies.pptx
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Programs and apps: productivity, graphics, security and other tools
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx
Network Security Unit 5.pdf for BCA BBA.

Usenix lisa 2011

Editor's Notes

  • #3: Worked on Traffic Server both at Yahoo, and at Apache.Before we go on, lets do a show of hands. How many have or are using a Proxy server of some sort?How many of you are or were using Squid ?There’s still hope for you.
  • #4: Traffic Server started as a commercial product, developed and sold by Inktomi way back in the days Yahoo! Acquired Inktomi in 2003, and the software was shelved. Yahoo! needed a reverse proxy to build their own CDN, and squid was not a viable option. So, we took ATS off the shelves again, and made it run on our RHEL distros. In 2009, Y! donated the Traffic Server source code to the Apache Software Foundation. In April of 2010, Apache Traffic Server became a TLP.
  • #5: Traffic Server is obviously not the only HTTP intermediary in the Open Source community. Existing servers include Apache mod_proxy, Squid, NGINX, Varnish and Haproxy. This makes the task of choosing a Proxy server an interesting, but challenging task. You really need to understand your problem space, your requirements, and any restrictions (like, budget). Easy for me to pick, but lets discuss some of the considerations you should take.
  • #6: I hate this slide, because by the time I do the presentation, this table is already wrong, and you can bet that someone in the audience will point it out! So, please look at this for the next 10 seconds, and then come to me after the presentation and complain.
  • #7: The point here is that performance of modern proxy servers is already ridiculous. Other things are more important, such as latency, or features.
  • #8: The point here is that performance of modern proxy servers is already ridiculous. Other things are more important, such as latency, or features.
  • #9: * Before we go into details of what drives Traffic Server, and how we use it, let me briefly discuss the three most common proxy server configurations.* In a forward proxy, the web browser has to be manually (or via auto-PAC files etc.) configured to use a proxy server for all (or some) requests. The browser typically sends the “full” URL as part of the GET request.The forward proxy typically is not required to be configured for “allowed” destination addresses, but can be configured with Access Control List, or blacklists controlling what requests are allowed, and by whom. A forward proxy is typically allowed to cache content, and a common use case scenario is inside corporate firewalls.
  • #10: A reverse proxy, aka a web accelerator, does not require the browser to cooperate in any special way. As far as the user (browser) is concerned, it looks like it’s talking to any other HTTP web server on the internet. The reverse proxy server on the other hand must be explicitly configured for what traffic it should handle, and how such requests are properly routed to the backend servers (aka. Origin Servers). Just as with a forward proxy, many reverse proxies are configured to cache content locally. It can also help load balancing and redundancy on the Origin Servers, and help solve difficult problems like Ajax routing.
  • #11: An intercepting proxy, also commonly called a transparent proxy, is very similar to a forward proxy, except the client (browser) does not require any special configuration. As far as the user is concerned, the proxying happens completely transparently. A transparent proxy will intercerpt the HTTP requests, modify them accordingly, and typically “forge” the source IP before forwarding the request to the final destination. Transparent proxies usually also implements traffic filters and monitoring, allowing for strict control of what HTTP traffic passes through the mandatory proxy layer. Typical use cases include ISPs and very strictly controlled corporate firewalls. I’m very excited to announce that as of a few days ago, code for transparent proxy is available in the subversion tree.
  • #12: * The obvious use case of a proxy is as a cache.
  • #13: Sorry, not cash, content cache. The idea is to offload traffic from the origin servers, your web servers, to the proxy cache.This has obvious advantages, such as easier to scale, easier to manage, and higher availabilityAnd finally, what most people associate a web cache for, you can move content closer to the user, on the “edge”.
  • #14: Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  • #15: Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  • #16: In TCP, every new connection has to go through a setup phase, typically referred to as the 3-way handshake. As you can see from the picture above, this means that there’s a full round-trip worth of latency before the client can even send the first HTTP request to the server. Since latency introduced by 3-way handshake is associated with network round-trip time, it goes without saying that the longer the distance between the client and the server, the longer the latency until the HTTP request can be sent. The solution to this problem is generally to use HTTP keep-alive between the client and server, which is a major reason why it is so critical for Traffic Server, and other intermediaries, to be able to handle tens of thousands of concurrent connections.
  • #17: Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  • #18: TCP congestion avoidance is a mechanism for TCP to avoid congestion on our networks. There are many different implementations of TCP congestion control mechanisms, but the general idea is to start out ‘slow’, and increase the amount of packets we have outstanding on the wires before we wait for an acknowledgement from the receiver. This is why sometimes congestion control is referred to as “slow start”. Similar to 3-way handshake, this will introduce latencies which are directly related to the round-trip time between client and server. Keep-alive generally doesn‘t solve this, since by default (sometimes configurable) an idle connection will force the restart of another slow start.
  • #19: Before we go into the next use case scenario, lets discuss a couple of common problems that can severely affect your web sites performance.There are several reasons why a Web page might be slow to render, three common problems that I personally have to deal with are TCP 3-way handshake, TCP congestion control, and DNS lookups. We’ll discuss the first two here, and explain what we’ve done at Yahoo! using Traffic Server to alleviate these two problems.
  • #20: Looks familiar?
  • #21: Looks familiar?
  • #22: Alright, so lets talk about what problems a good HTTP (and/or proxy server) can solve. There are two primary concurrency problems for the server software developers to consider:How can the software handle tens of thousands of concurrent TCP connections?How can the software take advantage of modern multi-core CPUs? Commodity hardware today has 2, or 4 and even 8 or more cores in each server.* Additionally, while solving these two problems, we have to make sure we don’t introduce other resource starvations, for example, memory pressure.
  • #23: Multithreading allows a process to split itself, and run multiple tasks in “parallel”. There is significantly less overhead running threads compared to individual processes, but threads are still not free. They need memory resources, and incur context switches. It’s a known methodology for solving the concurrency problem, and many, many server implementations relies heavily on threads. Modern OS’es have good support for threads, and standard libraries are widely available.
  • #24: Deadlocks, where two threads (or processes) need to acquire the same two resources (e.g. locks), which can cause the application to completely stall (unrecoverable) Race conditions can occur, where the outcome is not deterministic, but depends on timing or scheduling of threads execution. Difficult to code and ‘get right’.
  • #25: Events are scheduled by the event loop, and event handlers execute specific code for specific events This makes it easier to code for, there’s no risk of deadlock or race condition Can handle a good number of connections (but not unlimited) Squid is a good example of an event driven server.
  • #26: Can not block on I/O or the entire event processor stall CPU intensive processing in an event handler can starve pending events for CPU (solution: Cooperative multi-tasking, where the event handler yields the CPU) Latency can become an issue if an event processor has to handle a lot of events Can only use one CPU / core
  • #27: There are n worker threads per core, typically 2. This gives around 16 – 24 threads of execution threads on typical modern hardware, each running an event loop There are m I/O threads per disk spindle. This is used to deal with disk I/O outside of the worker threads, and the default is 4. A critical configuration decision here is to scale this appropriately, particularly if a “disk” is raided, and might have more than 1 spindle under the hood. There are also a small number of “helper” threads, to do tasks like accepting new connections, produce log output and stats aggregation and presentation* All threads share resources, such as RAM and Disk cache, configurations, stats and logs.
  • #28: When people first look at the ATS configurations, this is usually their reaction.But, it’s actually the complete oppositeGood defaults, in most cases you don’t have to change anythingMost configurations can be reloaded without restartMost features are readily configurable in readable formats.
  • #29: Traffic Server comes with a fairly large number of configuration files. Most of the configurations have reasonable “defaults”. Most applications wouldn’t use even a fraction of the available configuration options and features.
  • #30: Getting started, only two or maybe three configuration files are necessary to tweak. records.config is a key-value configuration format, holding most global application configuration settings storage.config is used to specify disk storage configurations remap.config is used to specify mapping rules for rewriting requests, typically in a reverse proxy setup
  • #41: * Now, the big question, was this a huge waste of your time at the end of a long day?I really hope that it was not, and here’s why
  • #42: * Apache Traffic Server is a great, versatile tool readily available, and it’s free!
  • #43: * Apache Traffic Server is fast, ridiculously fast. If it’s not fast enough for your needs, please let us know, and please hire some developers, because you probably can afford it.
  • #44: * And of course, Traffic Server has a very vibrant community, as a top-level Apache project.
  • #47: * And finally, I’d like to thank Go Daddy to not only let me play with fun technology all day, they also pay my bills
  • #50: First time I met some of the original developers of Traffic Server, John Plevyak and George Paul both mentioned the “four horsemen”Foundational belief held by some of the original developers of Traffic Server
  • #51: * RAW disks, striped and monitored internally* Very low overhead on CPU and disk I/O, since there is no LRU to manage Very low memory overhead (10 bytes per object stored on cache, compare to 60-70 bytes for Squid) Can support very large disks (0.5PB per “partition”)