(Extracted from T138093)
Steps
- Roll out libvmod-querysort package to varnishes.
- Enable query-sorting in Beta Cluster varnish.
- Enable query-sorting in production via X-Wikimedia-Debug.
- Set $wgCdnMatchParameterOrder = false on Beta. Test.
- Cherry-pick I3c52ca47e to deployment branches.
- Set $wgCdnMatchParameterOrder = false on testwiki.
- Enable querysort on testwiki.
- Set $wgCdnMatchParameterOrder = false on mediawiki.org.
- Enable querysort on mediawiki.org.
- Set $wgCdnMatchParameterOrder = false everywhere.
- Incrementally enable querysort for all domains (T138093#8117992)
- Add documentation on Wikitech (done)
Monitoring
Testing
MediaWiki
$wgCdnMatchParameterOrder test script: P32345 (run on mwdebug)
Checking Cache-Control header from an app server:
$ curl -s -i --connect-to ::$HOSTNAME -H 'X-Forwarded-Proto: https' 'https://test.wikipedia.org/w/index.php?action=history&title=Main_Page' | grep -i cache-control Cache-Control: private, must-revalidate, max-age=0
(should be Cache-Control: s-maxage=1209600, must-revalidate, max-age=0 once a87177564 is deployed)
Varnish
# Initial request is a cache miss (this may vary, obviously): $ curl -si 'https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Hobby&action=history' | grep -i x-cache x-cache: deployment-cache-text06 miss, deployment-cache-text06 miss x-cache-status: miss # Subsequent request is a cache hit: $ curl -si 'https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Hobby&action=history' | grep -i x-cache x-cache: deployment-cache-text06 miss, deployment-cache-text06 hit/1 x-cache-status: hit-remote # Subsequent request, now with sorted query parameters, should also be a hit: $ curl -si 'https://en.wikipedia.beta.wmflabs.org/w/index.php?action=history&title=Hobby' | grep -i x-cache x-cache: deployment-cache-text06 miss, deployment-cache-text06 hit/2 x-cache-status: hit-remote