0

该文档对这个主题不是很具体,它实际上只解释了当您调用管道子例程时会发生什么。为什么要在 Varnish VCL 中返回 (pipe) 以及在子例程 vcl_pipe 中会做哪些事情?

4

1 回答 1

1

为什么要在 Varnish VCL 中返回(管道)...?

我通常使用 return(pipe) 来避免 Varnish timeots 和请求的后处理(例如在提供大文件时)[1]

如果你想使用 websockets [2],管道也是你应该使用的东西

你会在子例程 vcl_pipe 中做些什么?

我只看过 websockets 指令和典型的(默认 VCl 包括它)连接关闭设置

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

于 2013-07-28T15:46:30.277 回答