503 remove backends response

Tobias Honacker t.honacker at googlemail.com
Tue Jul 22 07:13:51 CEST 2014


Hi all,

first some details of my varnish:

varnish-3.0.5-1.el6.x86_64
varnish-libs-3.0.5-1.el6.x86_64


We are trying to remove the response of 503 status the backend delivers to
our varnish.

--snip--

 37 TxHeader     b X-Backend-Healthy: yes
   37 TxHeader     b X-Varnish: 1092996393
   37 RxProtocol   b HTTP/1.1
   37 RxStatus     b 503
   37 RxResponse   b Service Unavailable
   37 RxHeader     b Server: cloudflare-nginx
   37 RxHeader     b Date: Mon, 21 Jul 2014 14:18:51 GMT
   37 RxHeader     b Content-Type: text/html
   37 RxHeader     b Transfer-Encoding: chunked
   37 RxHeader     b Connection: keep-alive
   37 RxHeader     b Set-Cookie: __
   37 RxHeader     b Cache-Control: no-cache
   37 RxHeader     b CF-Cache-Status: MISS
   37 RxHeader     b Vary: Accept-Encoding
   37 RxHeader     b CF-RAY:
   37 Fetch_Body   b 3(chunked) cls 0 mklen 1
   37 Length       b 459
   37 BackendReuse b host_1

--snip--

These Backend includes ESI to our site and if the backend (not sick at this
time) throw a 503 to our varnish we see the nginx error message at our page:

Error 503 .. Service Unavailable ...and so on

Now we tried to fix this using in vcl_error these method without success:

if ( (obj.status >= 500 || obj.status <= 505) && (req.url ~ "^/appserver/")
) {
      set obj.http.Cache-Control = "public, max-age=10";
      set obj.status = 200;
      set obj.response = "OK";
      return (deliver);
  }

we are aiming to serve a blank 200 status so that the error disappear on
our site where the ESI is included.

how could we fix that issue? is there any way not using synthetic while
serving blank html code? i dont like this "workaround".

thanks a lot for any help.

best regards
tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140722/3f4887b7/attachment.html>


More information about the varnish-misc mailing list