Hello,

A short while ago, the SRE Traffic team enabled
<https://gerrit.wikimedia.org/r/c/operations/puppet/+/823656> query-string
normalization for MediaWiki.org. This means that the caching layer
(Varnish, specifically) now rewrites the query string portion of request
URLs, so that query parameters are sorted by key. The re-written URL is
then used for the cache look-up and (if necessary) the backend request.
This improves the efficiency of the cache, since it allows
logically-equivalent requests with different URL forms to be served by a
single cache entry.

For example, this URL:
  https://www.mediawiki.org/w/index.php?title=Squid&action=history

Is re-written as:
  https://www.mediawiki.org/w/index.php?action=history&title=Squid

Care has been taken to make the sort stable for duplicate keys, and to
handle PHP array syntax (?foo[]=a&foo[]=b) correctly.

MediaWiki.org is the first wiki that gets real traffic where this is
enabled. If you encounter any weirdness, please file a task
<https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?parent=314868&template=314868&status=open>.
If everything looks good, we'll proceed with an incremental roll-out to
other wikis. This is tracked in T314868
<https://phabricator.wikimedia.org/T314868>.

Cheers
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to