records.config中文详解--ats

records.config中文详解







trafficserver的缓存分为两层:硬盘缓存和内存缓存
trafficserver的cache层分为两层:磁盘disk与缓存ram cache
#在用户第一次请求一个页面时,ts回源取出object返回给用户的同时将object写入disk。当用户第二次请求object时,直接disk命中,这时如果条件符合就将object写入ram cache,以后用户再次请求相同object时,就可能直接缓存命中,从而提高响应速度
#设置RAM缓存大小
CONFIG proxy.config.cache.ram_cache.size INT -1

#用于确定写入ram缓存的object大小,只有小于该数值的object才会缓存,默认为4M
CONFIG proxy.config.cache.ram_cache_cutoff INT 4194304






其他配置说明
records.config参数的一些备注
CONFIG proxy.config.admin.user_id STRING #-1
CONFIG proxy.config.http.cache.ignore_accept_mismatch INT 2
CONFIG proxy.config.http.cache.ignore_accept_language_mismatch INT 2
CONFIG proxy.config.http.cache.ignore_accept_encoding_mismatch INT 2 #这个参数删掉,设置成2会导致gzip有vary头才能分辨,设置成1不管有没有vary头都不能分辨压缩不压缩了都是存成一份,删掉后不管gzip的有没有vary头vcache都可以分辨。
CONFIG proxy.config.http.cache.ignore_accept_charset_mismatch INT 2
CONFIG proxy.config.dns.resolv_conf STRING NULL #关掉dns使用本地resolv.conf功能
CONFIG proxy.config.hostdb.strict_round_robin INT 1 #终端客户请求过来,该域名解析有多个ip地址的时候,设置成1,按照每次过来轮询访问,设置为0按照client固定一个ip地址访问。
CONFIG proxy.config.http.insert_request_via_str INT 0 #之前默认是1,修改成0,这个参数设置成1的时候,会再到上一层或者源请求的时候,request头信息里面带有via信息,这个时候源认为这是一个代理,有的源设置的gzip压缩再认为是代理的时候是不返回压缩文件的,比如nginx如果不开gzip_proxied any;那么vcache请求gzip的时候也会返回非gzip的文件。
#走父回源超时时间设置
CONFIG proxy.config.http.parent_proxy.retry_time INT 60
CONFIG proxy.config.http.parent_proxy.fail_threshold INT 10
CONFIG proxy.config.http.parent_proxy.total_connect_attempts INT 6
CONFIG proxy.config.http.parent_proxy.per_parent_connect_attempts INT 2
CONFIG proxy.config.http.parent_proxy.connect_attempts_timeout INT 5
CONFIG proxy.config.http.transaction_no_activity_timeout_out INT 120
CONFIG proxy.config.http.connect_attempts_max_retries INT 2
CONFIG proxy.config.http.connect_attempts_max_retries_dead_server INT 2
CONFIG proxy.config.http.connect_attempts_timeout INT 10
#
#
# Process Records Config File
#
# <RECORD-TYPE> <NAME> <TYPE> <VALUE (till end of line)>
#
# RECORD-TYPE: CONFIG, LOCAL
# NAME: name of variable
# TYPE: INT, STRING, FLOAT
# VALUE: Initial value for record
#range
#
# *NOTE*: All options covered in this file should be documented in the
# administration guide or the addendum:
#
#
##############################################################################
#
# System Variables
# 系统变量
##############################################################################
#TS的名字,初始化的时候会自动配置,取本机的hostname
CONFIG proxy.config.proxy_name STRING XNOP060-CT-AHHS-C-167-148
#配置文件目录
CONFIG proxy.config.config_dir STRING etc/trafficserver
#?命令行启动ts时的选项
CONFIG proxy.config.proxy_binary_opts STRING -M
#该脚本在traffice_manager启动traffice_server前执行
CONFIG proxy.config.env_prep STRING example_prep.sh
#设置接收告警邮件的邮箱
CONFIG proxy.config.alarm_email STRING nobody
#用于记录系统日志的设备
CONFIG proxy.config.syslog_facility STRING LOG_DAEMON
#ts进程日志文件名
CONFIG proxy.config.output.logfile STRING traffic.out
#快照路径
CONFIG proxy.config.snapshot_dir STRING snapshots
#应该是内存映射的参数
CONFIG proxy.config.system.mmap_max INT 2097152
##############################################################################
#
# Main threads configuration (worker threads). Also see configurations for
# SSL threads, disk I/O threads and task threads in their respective areas.
# 主要线程配置(工作线程),同时可以在各自的配置模块进行SSL线程,磁盘I/O线程和任务线程的配置。
#
##############################################################################
#ts的线程数量根据可用的CPU核数进行调整,默认值为1,即开启。
CONFIG proxy.config.exec_thread.autoconfig INT 1
#当proxy.config.exec_thread.autoconfig INT 值为1时,CPU核数与TS线程数量的默认比例,默认的缩放比例是1.5。CPU核数*缩放比例=TS线程数量
CONFIG proxy.config.exec_thread.autoconfig.scale FLOAT 1.5
#当proxy.config.exec_thread.autoconfig值为0时,TS线程数量
CONFIG proxy.config.exec_thread.limit INT 2
#当启用时(1),运行一个单独的线程来处理请求。如果禁用(0),那么只有一个线程
CONFIG proxy.config.accept_threads INT 1
##############################################################################
#
# 本地管理
# Local Manager
#
##############################################################################
#ts管理员用户名
CONFIG proxy.config.admin.admin_user STRING admin
#配置文件备份数量
CONFIG proxy.config.admin.number_config_bak INT 3
#设置ts进程的权限,设置为#-1表示启动之后不更改进程的权限。Set the user_id=#-1 and start trafficserver as root.
CONFIG proxy.config.admin.user_id STRING nobody
##############################################################################
#
# 进程管理
# Process Manager
#
##############################################################################
#配置管理端口
CONFIG proxy.config.admin.autoconf_port INT 8083
#traffic_manager和traffic_server内部通讯管理端口
CONFIG proxy.config.process_manager.mgmt_port INT 8084
##############################################################################
#
#如果要绑定一个特定的IP,可以使用如下的配置,如同下面的例子。注意–这可以包含两个IP,一个是IPv4一个是IPv6
# In order to only bind a specific IP, use the following config, as in
# the example below. Note – this can contain two addresses, one for IPv4
# sockets and one for IPv6 sockets.
#
##############################################################################
#LOCAL proxy.local.incoming_ip_to_bind STRING 192.168.101.17
#LOCAL proxy.local.incoming_ip_to_bind STRING 192.168.101.17 fc07:192:168:101::17
##############################################################################
#
# 告警配置
# Alarm Configuration
#
##############################################################################
# execute alarm as “<abs_path>/<bin> “<MSG_STRING_FROM_PROXY>””
#当发现告警时,可以触发一个指定的脚本。默认名称是example_alarm_bin.sh,脚本位于bin目录下。你必须编辑该脚本满足需求
CONFIG proxy.config.alarm.bin STRING example_alarm_bin.sh
#example_alarm_bin.sh的完整路径
CONFIG proxy.config.alarm.abs_path STRING NULL
##############################################################################
#
#HTTP引擎
# HTTP Engine
#
##############################################################################
##########
# 基础设置#
# basics #
##########
# The server ports are listed here. These are separated by spaces or commas.
# 服务监听的端口在这里列出。可以使用空格和逗号进行分隔
# Each port is a colon separated list of values, which must include a
# port number. The order is irrelevant. Other options are
# 每个端口都是一个冒号分隔的列表里的值,必须包含一个端口号。没有顺序要求。其他选项都有
# ipv4 – Use IPv4 (default)
# ipv6 – Use IPv6
# tr-in – Transparent inbound.
# tr-out – Transparent outbound.
# tr-full – Fully transparent (inbound and outbound).
# tr-pass – Transparently Pass-through non-HTTP traffic (in conjuction with tr-in).
# ssl – SSL terminated port.
# blind – Blind tunnel port (CONNECT only)
# ip-in=[addr] – Bind inbound IP address (listen for client).
# ip-out=[addr] – Bind outbound IP address (connect to origin server).
# ip-resolve=[style] – Set the IP resolution style.
#
# Note – address types must agree with each other and the ipv4/ipv6
# option if specified. IPv6 addresses must be enclosed in brackets.
# ip-out can be repeated as long as each address is a different
# family. If ip-in is specified as an IPv6 address, the port is
# forced to IPv6. Transparent ports cannot be bound to an IP
# address on the transparent side.
#
# The ‘=’ is optional for any option with a value.
#
# Example 1: Port 8080 IPv6 inbound transparent, and port 80 IPv4
# “8080:ipv6:tr-in 80”
#
# Example 2: Listen on standard http and https ports for IPv4 and IPv6,
# fully transparent on the http ports. Also provide an non-transparent
# port at address 192.168.1.56 on port 8080.
# “80:ipv4:tr-full tr-full:80:ipv6 443:ipv4:ssl 443:ssl:ipv6 ip-in=192.168.1.56:8080”
#
#HTTP通讯所使用的端口列表(对外提供服务的端口)
CONFIG proxy.config.http.server_ports STRING 8080
# Ports on the origin server to which a blind tunnel may connect.
#?SSL端口列表
CONFIG proxy.config.http.connect_ports STRING 443 563
# The via settings have four values
# via的设置有四种值
# 0 – Do not modify / set this via header
# 0 – 不做任何修改 /设置目前的via头
# 1 – Update the via, with normal verbosity
# 1 – 更新via,添加正常的信息
# 2 – Update the via, with higher verbosity
# 2 – 更新via,添加较多的信息
# 3 – Update the via, with highest verbosity
# 3 – 更新via,添加最多的信息
#设置如何处理via请求到源服务器
CONFIG proxy.config.http.insert_request_via_str INT 1
#设置如何处理via响应到源服务器
CONFIG proxy.config.http.insert_response_via_str INT 0
# Insert a Server: header, this has three values
# 插入一个server:头有一下四种选项
# 0 – 不添
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值