BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/311726
Change subject: N-hit-wonder: 4-hit, and improve filtering ...................................................................... N-hit-wonder: 4-hit, and improve filtering In addition to raising this from 2-hit-wonder to 4-hit-wonder, there's also some changes to the filtering here: (1) Don't pay attention to beresp.ttl at all (seems pointless) and (2) Filter on local cache disposition of "miss" (as opposed to "pass" or "int"), mostly so this doesn't interfere with natural or hit-for-pass passes. Bug: T144187 Change-Id: I89cf391483547ba259285925f5462d079dd60107 --- M modules/varnish/templates/upload-frontend.inc.vcl.erb 1 file changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/311726/1 diff --git a/modules/varnish/templates/upload-frontend.inc.vcl.erb b/modules/varnish/templates/upload-frontend.inc.vcl.erb index f9cac18..e9f1bd0 100644 --- a/modules/varnish/templates/upload-frontend.inc.vcl.erb +++ b/modules/varnish/templates/upload-frontend.inc.vcl.erb @@ -77,18 +77,13 @@ } <%- end -%> - // Two-hit-wonder experiment: if the immediate backend does not indicate - // hit/2 or higher, deliver the object as normal but do not create a new + // Four-hit-wonder experiment: if the immediate backend does not indicate + // hit/4 or higher, deliver the object as normal but do not create a new // cache entry of any kind. We start caching in the frontend when an - // object is accessed for the 3rd time across all frontends in this DC. - // The ttl>3600 check is to ensure we don't apply this to any short-TTL - // edge cases we're not thinking of. - // We probably want to either back out this experiment later or improve - // on it, especially re: multiplying backend requests when warming a - // cold cache. + // object is accessed for the 5th time across all frontends in this DC. if (beresp.status == 200 - && beresp.http.X-Cache-Int !~ " hit/([2-9]|[0-9]{2,})$" - && beresp.ttl > 3600s) { + && bereq.http.X-CDIS == "miss" + && beresp.http.X-Cache-Int !~ " hit/([4-9]|[0-9]{2,})$") { set beresp.ttl = 0s; <%- if @varnish_version4 -%> set beresp.uncacheable = true; -- To view, visit https://gerrit.wikimedia.org/r/311726 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89cf391483547ba259285925f5462d079dd60107 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