Apache-Trafficserver-Server Documentation
Total Page:16
File Type:pdf, Size:1020Kb
Apache-Trafficserver-Server Documentation latest 7 21, 2017 Contents 1 1 1.1 Apache Traffic Server?.........................................1 1.2 Typographic Conventions........................................1 1.3 Other Resources.............................................2 2 Getting Started 3 2.1 Introduction...............................................3 2.2 Installation................................................4 2.3 Configuration...............................................6 2.4 Logging and Monitoring.........................................9 2.5 Further Steps...............................................9 3 Administrator’s Guide 11 3.1...................................................... 11 3.2 Traffic Server.............................................. 16 3.3...................................................... 19 3.4 Interacting with Traffic Server...................................... 54 3.5 Security.................................................. 54 3.6 Cache Storage.............................................. 58 3.7 Plugins.................................................. 64 3.8 Event and Error Monitoring....................................... 179 3.9 Configuring Traffic Server........................................ 213 3.10 Performance Tuning........................................... 214 3.11 Configuration Files............................................ 218 3.12 Audience................................................. 258 4 Developer’s Guide 259 4.1 Introduction............................................... 259 4.2 Release Process............................................. 260 4.3 Contributing to Traffic Server...................................... 262 4.4 Using Vagrant to Test Traffic Server................................... 262 4.5 Debugging and Analysis......................................... 266 4.6 Cache Architecture............................................ 268 4.7 Plugin Development........................................... 291 4.8 Configuration Variable Implementation................................. 376 4.9 API Reference.............................................. 379 4.10 Continuous Integration.......................................... 475 i 4.11 Documentation.............................................. 475 4.12 Host Resolution Proposal........................................ 488 5 Appendices 491 5.1 Command Line Utilities......................................... 491 5.2 Frequently Asked Questions....................................... 505 5.3 Troubleshooting Tips........................................... 511 5.4 Glossary................................................. 514 5.5 HTTP Status Codes........................................... 516 6 Indices and tables 517 ii CHAPTER 1 Apache Traffic Server? Apache Traffic Server™ is a high-performance web proxy cache that improves network efficiency and performance by caching frequently-accessed information at the edge of the network. This brings content physically closer to end users, while enabling faster delivery and reduced bandwidth use. Traffic Server is designed to improve content delivery for enterprises, Internet service providers (ISPs), backbone providers, and large intranets by maximizing existing and available bandwidth. This manual will explore every aspect of installing, managing, extending, and troubleshooting Traffic Server. Typographic Conventions This documentation uses the following typographic conventions: Italic Used to introduce new terms on their initial appearance. Example: The Apache Traffic Server™ object storage is based on a cyclone buffer architecture. Cyclone buffers are a form of storage addressing in which a single writer continually reclaims the oldest allocations for use by new updates. Monospace Represents C/C++ language statements, commands, file paths, file content, and computer output. Example: The default installation prefix for Traffic Server is /usr/local/ts. Bracketed Monospace Represents variables for which you should substitute a value in file content or commands. Example: Running the command traffic_line -r <name> will display the current value of a perfor- mance statistic, where <name> is the statistic whose value you wish to view. Ellipsis Indicates the omission of irrelevant or unimportant information. 1 Apache-Trafficserver-Server Documentation, latest Other Resources Websites Official Website https://trafficserver.apache.org/ The official Apache Traffic Server™ project website is hosted by the Apache Software Foundation. Documen- tation, software downloads, community resource links, security announcements, and more are located, or linked to, at the site. Online Documentation https://docs.trafficserver.apache.org/ The most up to date version of the documentation is hosted at Read the Docs, with built-in search functionality. Documentation for past releases is also available. Jira Bug Tracker https://issues.apache.org/jira/browse/TS If you wish to report bugs, or look for open issues on which you may help contribute to the Traffic Server project, please visit the public Jira bug tracker site. Mailing Lists User List The user’s mailing list offers support and discussions oriented to users and administrators of the Traffic Server software. Send an email to [email protected] to join the list. Developer List If you have questions about, or wish to discuss, the development of Traffic Server, plugins for the server, or other developer-oriented matters, the developer list offers an active list of both core project members and external contributors. Send an email to [email protected] to join the list. Internet Relay Chat (IRC) The #traffic-server channel on irc.freenode.net is the official IRC resource for the Traffic Server project, and boasts active discussions. Community Forums 2 Chapter 1. CHAPTER 2 Getting Started Introduction Apache Traffic Server™ provides a high-performance and scalable software solution for both forward and reverse proxying of HTTP/HTTPS traffic, and may be configured to run in either or both modes simultaneously. This Getting Started guide explains the basic steps an administrator new to Traffic Server will need to perform to get the software up and running in a minimal configuration as quickly as possible. Example Scenario In this guide, we will use the fictional company Acme Widgets as a basis for the configuration examples. Acme Widgets has a product brochure website (assumed to reside at the domain www.acme.com) that performs very poorly. The content management software they chose takes an unbearable amount of time to generate pages on every request and their engineering team has chosen Traffic Server as a caching proxy layer to improve site performance. Separately, Acme Widgets has decided to use Traffic Server to help improve the performance of their office’s Internet access, which is hobbled by their reliance on an aging leased line and certain employees’ predilection for extracurric- ular web browsing. Terminology This guide uses some terms which may be unfamiliar to administrators new to proxy servers. Origin Server The server which generates the content you wish to proxy (and optionally cache) with Traffic Server. In a forward proxy configuration, the origin server may be any remote server to which a proxied client attempts to connect. In a reverse proxy configuration, the origin servers are typically a known set of servers for which you are using Traffic Server as a performance-enhancing caching layer. Reverse Proxy A reverse proxy appears to outside users as if it were the origin server, though it does not generate the content itself. Instead, it intercepts the requests and, based on the configured rules and contents of its cache, will either serve a cached copy of the requested content itself, or forward the request to the origin server, possibly caching the content returned for use with future requests. 3 Apache-Trafficserver-Server Documentation, latest Forward Proxy A forward proxy brokers access to external resources, intercepting all matching outbound traffic from a network. Forward proxies may be used to speed up external access for locations with slow connections (by caching the external resources and using those cached copies to service requests directly in the future), or may be used to restrict or monitor external access. Transparent Proxy A transparent proxy may be either a reverse or forward proxy (though nearly all reverse proxies are deployed transparently), the defining feature being the use of network routing to send requests through the proxy without any need for clients to configure themselves to do so, and often without the ability for those clients to bypass the proxy. For a more complete list of definitions, please see the Glossary. Installation As with many other software packages, you may have the option of installing Apache Traffic Server™ from your operating system distribution’s packages, or compiling and installing from the source code yourself. Distribution packages may lag behind the current stable release of Traffic Server, sometimes by a significant amount. While we will cover briefly the packages required for common operating system distributions, the remainder of this guide will be assuming the latest stable release of Traffic Server when discussing configuration parameters and available features. Installing From Distribution Packages It is recommended that you install from source code, as described in the section below, rather than rely on your distribution’s packages if you wish to have access to the latest features and