Enabling read-while-writer

The following settings are required for the read-while-writer feature to function:

CONFIG proxy.config.cache.max_doc_size INT 0
CONFIG proxy.config.cache.enable_read_while_writer INT 1
CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0

With this enabled, the pressure on a single object that is uncacheable is heavily improved. See TS-505 for more details. In addition, this setting makes life quite nice again:

CONFIG proxy.config.http.cache.max_open_read_retries INT -1

I've made this the new default on Apache Traffic Server trunk, it makes things 10-20x faster under certain conditions, and 20x less latency.


这几个参数会产生2个效果:
1,如果同时有多个用户请求一个文件,那么只有第一个用户会到后台去取,其他用户共用这个用户的返回结果。
2,如果用户的请求从客户端中断,TS会继续完成整个请求,并保存。


1,    如果碰到分段请求呢(在header里指定range段)http返回code为206,我测试了貌似也没有缓存任何东西。
2,  如果用直接请求文件http返回code为200,哪怕中间客户端取消没下载完成的文件,都会把文件缓存下了!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值