Problem with enabling streaming

Per Buer perbu at varnish-software.com
Sat Aug 14 11:38:39 CEST 2010


On Fri, Aug 13, 2010 at 3:02 PM, Mariusz Pietrzyk <wijet at me.com> wrote:

> Hi,
>
> On 2010-08-13, at 13:02, Per Buer wrote:
>
> On Fri, Aug 13, 2010 at 12:31 PM, Mariusz Pietrzyk <wijet at me.com> wrote:
>
> Is there any way around it ? and use "pipe" in vcl_fetch or something else
>> to enable streaming based on backend response?
>>
>
> You could probably modify the request object, restart and then pick up the
> change in vcl_recv. Not ideal, but it should work.
>
>
> Where I should do that ?
>

> I don't know which request should be streamed till I get whole response
> from backend in vcl_fetch.
>

In vcl_fetch you'll have the headers, not the object itself. I think you
should modify the req object in vcl_fetch and add a X-pipe: header. The
restart the transaction.

In vcl_recv you test for the named header and call pipe. I'm
not entirely sure how Varnish will handle a switch from pass to pipe in the
middle of a restart, but it should be easy to test.

-- 
Per Buer,  Varnish Software
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100814/2a566aea/attachment-0003.html>


More information about the varnish-dev mailing list