BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320310

Change subject: VCL: retry explicit 503 once as well
......................................................................

VCL: retry explicit 503 once as well

In Varnish 3 these cases were blended together, but in Varnish 4
they're distinct: you can only catch->retry explicit 503s in
vcl_backend_response, and you can only catch->retry implicit 503s
in vcl_backend_error.  Since both are protected with
bereq.retries==0, they can't both be applied to the same backend
fetch attempt.

Change-Id: Ib91a48f13c49ea4322a86e844e1640c3d6f22422
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/320310/1

diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 7d607f9..969505b 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -342,6 +342,11 @@
 
 <% if @varnish_version4 -%>
 sub vcl_backend_response {
+       // retry 503 once in frontend instances, to paper over transient issues
+       // This catches the backending handing us an explicit 503
+       if (beresp.status == 503 && bereq.retries == 0) {
+               return(retry);
+       }
 <% else -%>
 sub vcl_fetch {
 <% end -%>
@@ -435,6 +440,7 @@
 
 sub vcl_backend_error {
        // retry 503 once in frontend instances, to paper over transient issues
+       // This catches an implicit 503 (e.g. connectfail, timeout, etc)
        if (beresp.status == 503 && bereq.retries == 0) {
                return(retry);
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/320310
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib91a48f13c49ea4322a86e844e1640c3d6f22422
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <bbl...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to