Reputation: 2716
The documentation isn't very specific on this subject and it really only explains what happens when you call the pipe subroutine. Why would you return (pipe) in a Varnish VCL and what are some things you would do in the subroutine vcl_pipe?
Upvotes: 0
Views: 1662
Reputation: 1236
Why would you return (pipe) in a Varnish VCL...?
I typically use return(pipe) to avoid Varnish timeots & post-processing of request (by example when serving huge files) [1]
Pipe also is something you should use if you want to use websockets [2]
what are some things you would do in the subroutine vcl_pipe?
I've only seen websockets instructions and the typical (default VCl includes it) connection close setting
set bereq.http.connection = "close"
[1] https://www.varnish-cache.org/trac/wiki/VCLExamplePipe
[2] https://www.varnish-cache.org/docs/3.0/tutorial/websockets.html
Upvotes: 1