is the POST content reforwarded in case of a restart ?

Ken Brownfield kbrownfield at google.com
Mon Apr 18 21:56:35 CEST 2011


Yes, this has been confirmed a few times on varnish-misc.  I'd suggest not
restarting POST in the case of a 500 status.  A 503 status (no available
Varnish backend) is debatable.  Personally, I restart POSTs that receive
503s because my app(s) don't return 503.

FWIW,
-- 
kb



On Mon, Apr 18, 2011 at 12:45, cosmih <cosmih at gmail.com> wrote:

> Hello,
>
> Because I haven't found this information anywhere I would like to ask
> you if the POST content will be forwarded again in case a restart is
> involved like in the below example:
>
> sub vcl_recv {
>   set req.http.ORIGINAL-REQUEST = req.url;
>   if (req.url ~ "^/path1/somthing/else" ) {
>      set req.url = reqsub(req.url, "/path1/(.*)$", "/path2/\1");
>      set backend = round_robin_director;
>   }
> }
>
> sub vcl_fetch {
>   if (beresp.status == 500 || beresp.status == 400) {
>      set beresp.saintmode = 5s;
>      set req.url = req.http.ORIGINAL-REQUEST;
>      restart;
>   }
> }
>
> sub vcl_error {
>   if (obj.status == 503 && req.restarts < 6) {
>      set req.url = req.http.ORIGINAL-REQUEST;
>      restart;
>   }
> }
>
>
> Regards,
>
> --
> Cosmih
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110418/fd3c46e7/attachment-0003.html>


More information about the varnish-misc mailing list