Traffser Server管理员指南-概述
时间:2010-04-11 来源:cbin_07
概述
Traffic Server能够加速上网速度,提升网站性能,提供超出预期的网络托管能力。
这个章节讨论以下几个主题:
- Traffic Server是什么?
-
Traffic Server部署方式
-
Traffic Server组件
- Traffic Analysis选项
-
Traffic Server安全选项
Traffic Server是什么?
全球数据网络已经成为每天生活的一部分:在世界各地的internet用户日常工作中,他们需要数十亿的文档和上TB的数据。这些信息是免费、丰富和方便获得的。不幸的是,对于IT专业人士来说,全球数据网络可能是个恶梦。他们挣扎于超负载的服务器和拥挤的网络。持续、可靠的满足社会不断增长的数据需求会是个挑战。
Traffic Server是一个高性能的web proxy cache,它可以通过在边缘网络cache频繁访问的信息提高网络的效率和性能。这样可以使得内容尽量的在物理上靠近终端用户,同时可以更快的分发内容和减少网络带宽的使用。Traffic Server的设计通过充分利用现有的可用带宽来为企业、ISP、骨干providers和大型intranets改善内容分发。
Traffic Server部署方式
为了最好的满足您的需求, Traffic Server能够以以下几种方式部署:
- 作为一个web proxy cache
- 作为一个reverse proxy
- 部署在cache hierarchy
以下部分提供Traffic Server这几种部署方式的摘要说明。
Traffic Server作为一个Web Proxy Cache
作为一个web proxy cache, Traffic Server接收用户的web内容请求,就像这些请求请求目的web server(origin server)一样。如果Traffic Server包含被请求的内容,就直接服务这些请求。如果被请求的内容在cache中没有,则Traffic Server 作为一个proxy:从origin server获取被请求的内容服务用户,同时保持一份拷贝用来服务后续的请求。
Traffic Server提供explicit proxy caching,在这种情况下用户的客户端软件需要被配置成把请求支持发送至Traffic Server。 Explicit proxy caching在“Explicit Proxy Caching”章节描述。
Traffic Server作为一个Reverse Proxy
作为一个reverse proxy, Traffic Server被配置为origin server,让用户尝试连接 (通常, origin server的广告主机名解析至Traffic Server, 让它来扮演一个真实的origin server). reverse proxy 特征也叫做server acceleration(服务器加速). Reverse proxy的更多细节将在“Reverse Proxy and HTTP Redirects”中描述。
Traffic Server部署在Cache Hierarchy
Traffic Server可以参与到灵活的cache hierarchies。在cache hierarchies中网络请求不是由一个被路由至其它区域caches的cache完成,从而leveraging the contents and proximity of nearby caches。在一个proxy server的层级中,Traffic Server可以既可以作为其它Traffic Server系统或相似缓存产品的父cache也可以作为子cache。
Traffic Server支持 ICP (Internet Cache Protocol) peering. Hierarchical caching的更多细节将在“Hierarchical Caching”中描述。
Traffic Server组件
Traffic Server包含几个一起工作的组件构成一个可以很容易监控和配置的web proxy cache。这些主要组件在以下描述。
The Traffic Server Cache
The Traffic Server cache包含一个称为object store的高速object数据库。object store通过URLs和相关headers进行检索。使用先进的对象管理,object store可以cache同一个object的不同版本 (也许是不用的语言和编码)。它还能有效的存储非常小和非常大的objes,从而最大限度的减少浪费的存储空间。当cache满时,Traffic Server删除失效的数据从而保证频繁被请求的objects总是可用和新鲜的。
Traffic Server被设计为可以容忍cache磁盘上的任何磁盘故障。如果一个磁盘完全失效,Traffic Server会标记整个磁盘为坏的状态,同时继续使用剩下的磁盘。如果所有的cache磁盘都失效,Traffic Server将切换至只做代理的模式。你可以划分一块缓存,作为存储具体协议和源站的特定空间的备份。有关cache的更多信息,见“ Configuring the Cache”。
The RAM Cache
Traffic Server维护一个很小的RAM cache用来存储极度热点的objects。这个RAM cache尽可能快的服务最热的objects,以减少磁盘的负载,特别是在临时流量高峰时。你可以根据需求配置合适的RAM cache大小;更详细的信息,见“Changing the Size of the RAM Cache”。
The Host Database
The Traffic Server host database stores the domain name server (DNS) entries of origin servers to which Traffic Server connects to fulfill user requests. This information is used to adapt future protocol interactions and optimize performance. Along with other information, the host database tracks:
- DNS information (for fast conversion of hostnames to IP addresses)
- The HTTP version of each host (so advanced protocol features can be used with hosts running modern servers)
- Host reliability and availability information (so users will not wait for servers that are not running)
The DNS Resolver
Traffic Server includes a fast, asynchronous DNS resolver to streamline conversion of hostnames to IP addresses. Traffic Server implements the DNS resolver natively by directly issuing DNS command packets rather than relying on slower, conventional resolver libraries. Since many DNS queries can be issued in parallel and a fast DNS cache maintains popular bindings in memory, DNS traffic is reduced.
Traffic Server Processes
Traffic Server contains three processes that work together to serve Traffic Server requests and manage/control/monitor the health of the Traffic Server system. The three processes are described below:
- The traffic_server process is the transaction processing engine of Traffic Server. It is responsible for accepting connections, processing protocol requests, and serving documents from the cache or origin server.
- The traffic_manager process is the command and control facility of the Traffic Server, responsible for launching, monitoring, and reconfiguring the traffic_server process. The traffic_manager process is also responsible for the proxy autoconfiguration port, the statistics interface, cluster administration, and virtual IP failover.
If the traffic_manager process detects a traffic_server process failure, it instantly restarts the process but also maintains a connection queue of all incoming requests. All incoming connections that arrive in the several seconds before full server restart are saved in the connection queue and processed in first-come, first-served order. This connection queueing shields users from any server restart downtime. - The traffic_cop process monitors the health of both the traffic_server and traffic_manager processes. The traffic_cop process periodically (several times each minute) queries the traffic_server and traffic_manager process by issuing heartbeat requests to fetch synthetic web pages. In the event of failure (if no response is received within a timeout interval or if an incorrect response is received), traffic_cop restarts the traffic_manager and traffic_server processes.
The figure below illustrates the three Traffic Server processes.
Administration Tools
Traffic Server offers the following administration options:
- The Traffic Line command-line interface is a text-based interface from which you can monitor Traffic Server performance and network traffic, as well as configure the Traffic Server system. From Traffic Line, you can execute individual commands or script a series of commands in a shell.
- The Traffic Shell command-line interface is an additional command-line tool that enables you to execute individual commands that monitor and configure the Traffic Server system.
- Various configuration files enable you to configure Traffic Server through a simple file-editing and signal-handling interface. Any changes you make through Traffic Line or Traffic Shell are automatically made to the configuration files as well.
Traffic Analysis Options
Traffic Server provides several options for network traffic analysis and monitoring:
- Traffic Line and Traffic Shell enable you to collect and process statistics obtained from network traffic information.
- Transaction logging enables you to record information (in a log file) about every request Traffic Server receives and every error it detects. By analyzing the log files, you can determine how many people used the Traffic Server cache, how much information each person requested, and what pages were most popular. You can also see why a particular transaction was in error and what state the Traffic Server was in at a particular time; for example, you can see that Traffic Server was restarted or that cluster communication timed out.
Traffic Server supports several standard log file formats, such as Squid and Netscape, and its own custom format. You can analyze the standard format log files with off-the-shelf analysis packages. To help with log file analysis, you can separate log files so that they contain information specific to protocol or hosts.
Traffic analysis options are described in more detail in Monitoring Traffic; Traffic Server logging options are described in Working with Log Files.
Traffic Server Security Options
Traffic Server provides numerous options that enable you to establish secure communication between the Traffic Server system and other computers on the network. Using the security options, you can do the following:
- Control client access to the Traffic Server proxy cache.
- Configure Traffic Server to use multiple DNS servers to match your site’s security configuration. For example, Traffic Server can use different DNS servers, depending on whether it needs to resolve hostnames located inside or outside a firewall. This enables you to keep your internal network configuration secure while continuing to provide transparent access to external sites on the Internet.
- Configure Traffic Server to verify that clients are authenticated before they can access content from the Traffic Server cache.
- Secure connections in reverse proxy mode between a client and Traffic Server, and Traffic Server and the origin server, using the SSL termination option.
- Control access via SSL (Secure Sockets Layer).
Traffic Server security options are described in more detail in Security Options.