You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Chu Duc Minh <ch...@gmail.com> on 2013/10/14 12:44:57 UTC

Collapsed Forwarding not work

I'm using ATS v4.0.1 and Collapsed Forwarding not work in reverse-proxy
mode!
I follow https://cwiki.apache.org/confluence/display/TS/Collapsed+Forwarding
and config:
CONFIG proxy.config.cache.enable_read_while_writer INT 1
CONFIG proxy.config.http.background_fill_active_timeout INT 0
CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.000000
CONFIG proxy.config.cache.max_doc_size INT 0

But when i test:
ab -n 10 -c 5 -k http://myatserver/myfile.jpg

But 12 requests reached my backend server(Apache2). I check apache log, and
sure about this.

ATS's Collapsed Forwarding (connection collapsing) not work in
Reverse-proxy mode? Or i missed something in configuration?

Thanks a lot!

Re: Collapsed Forwarding not work

Posted by Leif Hedstrom <zw...@apache.org>.
On Oct 14, 2013, at 9:14 PM, Chu Duc Minh <ch...@gmail.com> wrote:

> Hi, how I could turn this on via remap.config or plugins? Can you give me some examples, pls!
> 
> Thank you very much!

conf_remap.so

-- Leif


Re: Collapsed Forwarding not work

Posted by Chu Duc Minh <ch...@gmail.com>.
Hi, how I could turn this on via remap.config or plugins? Can you give me
some examples, pls!

Thank you very much!


On Tue, Oct 15, 2013 at 9:30 AM, Leif Hedstrom <zw...@apache.org> wrote:

>
> On Oct 14, 2013, at 6:51 PM, Chu Duc Minh <ch...@gmail.com> wrote:
>
> Yes, object is cacheable and not in cache. I also configured:
> CONFIG proxy.config.http.cache.required_headers INT 0
>
> From the second run test, it does not request to origin any more. But I
> want to configure ATS to reduce request/connection number used to get
> content from origin when object was not in cache (for example: cold start).
>
>
>
>
> E.g.
>
> CONFIG proxy.config.http.cache.max_open_read_retries INT 5
> CONFIG proxy.config.http.cache.open_read_retry_time INT 10
>
>
> That would stall subsequent requests on a total cache miss for up to 50ms.
> Note that if you put this in records.config, it applies to all requests,
> which can be very detrimental for non-cacheable content. You are best off
> turning this on via remap.config or plugins such that it only applies for
> content which you know has reasonable chance of being cacheable.
>
>
>
> https://trafficserver.readthedocs.org/en/latest/admin/http-proxy-caching.en.html#reducing-origin-server-requests-avoiding-the-thundering-herd
>
>
> — Leif
>
>

Re: Collapsed Forwarding not work

Posted by Leif Hedstrom <zw...@apache.org>.
On Oct 14, 2013, at 6:51 PM, Chu Duc Minh <ch...@gmail.com> wrote:

> Yes, object is cacheable and not in cache. I also configured:
> CONFIG proxy.config.http.cache.required_headers INT 0
> 
> From the second run test, it does not request to origin any more. But I want to configure ATS to reduce request/connection number used to get content from origin when object was not in cache (for example: cold start).
> 
> 



E.g.

CONFIG proxy.config.http.cache.max_open_read_retries INT 5
CONFIG proxy.config.http.cache.open_read_retry_time INT 10


That would stall subsequent requests on a total cache miss for up to 50ms. Note that if you put this in records.config, it applies to all requests, which can be very detrimental for non-cacheable content. You are best off turning this on via remap.config or plugins such that it only applies for content which you know has reasonable chance of being cacheable.


https://trafficserver.readthedocs.org/en/latest/admin/http-proxy-caching.en.html#reducing-origin-server-requests-avoiding-the-thundering-herd


— Leif


Re: Collapsed Forwarding not work

Posted by Chu Duc Minh <ch...@gmail.com>.
Yes, object is cacheable and not in cache. I also configured:
CONFIG proxy.config.http.cache.required_headers INT 0

>From the second run test, it does not request to origin any more. But I
want to configure ATS to reduce request/connection number used to get
content from origin when object was not in cache (for example: cold start).

PS: how I can "enable head of line blocking"?

Thanks you!
On Oct 15, 2013 12:18 AM, "Leif Hedstrom" <zw...@apache.org> wrote:

>
> On Oct 14, 2013, at 4:44 AM, Chu Duc Minh <ch...@gmail.com> wrote:
>
> I'm using ATS v4.0.1 and Collapsed Forwarding not work in reverse-proxy
> mode!
> I follow
> https://cwiki.apache.org/confluence/display/TS/Collapsed+Forwarding
> and config:
> CONFIG proxy.config.cache.enable_read_while_writer INT 1
> CONFIG proxy.config.http.background_fill_active_timeout INT 0
> CONFIG proxy.config.http.background_fill_completed_threshold FLOAT
> 0.000000
> CONFIG proxy.config.cache.max_doc_size INT 0
>
> But when i test:
> ab -n 10 -c 5 -k http://myatserver/myfile.jpg
>
>
> Is the object cacheable? Is it in cache? You didn’t  enable head of line
> blocking on these it seems, so if the object was not in cache and expired,
> everyone is allowed to go to origin.
>
> — Leif
>
>

Re: Collapsed Forwarding not work

Posted by Leif Hedstrom <zw...@apache.org>.
On Oct 14, 2013, at 4:44 AM, Chu Duc Minh <ch...@gmail.com> wrote:

> I'm using ATS v4.0.1 and Collapsed Forwarding not work in reverse-proxy mode!
> I follow https://cwiki.apache.org/confluence/display/TS/Collapsed+Forwarding
> and config:
> CONFIG proxy.config.cache.enable_read_while_writer INT 1
> CONFIG proxy.config.http.background_fill_active_timeout INT 0
> CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.000000
> CONFIG proxy.config.cache.max_doc_size INT 0
> 
> But when i test: 
> ab -n 10 -c 5 -k http://myatserver/myfile.jpg

Is the object cacheable? Is it in cache? You didn’t  enable head of line blocking on these it seems, so if the object was not in cache and expired, everyone is allowed to go to origin.

— Leif