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,哪怕中间客户端取消没下载完成的文件,都会把文件缓存下了!