BBlack has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/379199 )
Change subject: VCL: do not randomize backends for MISS2PASS traffic
......................................................................
VCL: do not randomize backends for MISS2PASS traffic
Change-Id: I2ecf9624d5af446edc650e276f65b1925d101b27
---
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
1 file changed, 12 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/99/379199/1
diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index df5dfe4..83de965 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -150,7 +150,6 @@
call wm_common_miss;
call cluster_be_miss;
if (req.http.X-MISS2PASS) {
- unset req.http.X-MISS2PASS;
return (pass);
}
return (fetch); // no default VCL (which is just "return (fetch)"
anyways)
@@ -161,11 +160,18 @@
<% if @realm == "production" and @hostname != "cp1008" -%>
<% if @vcl_config.fetch("pass_random", false) -%>
- if (req.http.X-Next-Is-Cache) {
- // pass-traffic should not use consistent hashing, to avoid
unecessary
- // traffic focus on one node and keep things performant, *if*
we're
- // fairly sure that all layers/tiers make equivalent pass
decisions...
- set req.backend_hint = cache_<%= @cache_route
%>_random.backend();
+ if (req.http.X-MISS2PASS) {
+ unset req.http.X-MISS2PASS;
+ // avoid pass_random behavior on MISS2PASS requests, as these
still
+ // need chashing for opportunistic hits
+ }
+ else {
+ if (req.http.X-Next-Is-Cache) {
+ // pass-traffic should not use consistent hashing, to
avoid unecessary
+ // traffic focus on one node and keep things
performant, *if* we're
+ // fairly sure that all layers/tiers make equivalent
pass decisions...
+ set req.backend_hint = cache_<%= @cache_route
%>_random.backend();
+ }
}
<% end -%>
<% end -%>
--
To view, visit https://gerrit.wikimedia.org/r/379199
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ecf9624d5af446edc650e276f65b1925d101b27
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits