$wgHTCPMulticastRouting rename + multi hosts support
authorAntoine Musso <hashar@free.fr>
Tue, 2 Jul 2013 10:50:48 +0000 (12:50 +0200)
committerAntoine Musso <hashar@free.fr>
Wed, 31 Jul 2013 14:07:05 +0000 (16:07 +0200)
commite137df71af56ac3c53723ca425a673a993e56ae3
tree5dca46758b51c9bdf697087f0790a7b01793725f
parent41028cf9dedb57c29ab0705db2218d536a4ca2a2
$wgHTCPMulticastRouting rename + multi hosts support

This patch does two things:

A) rename $wgHTCPMulticastRouting to $wgHTCPRouting since you can have
   MediaWiki send purge packets over unicast.
B) add support for multi hosts purge in the few cases one want to split
   the multicast groups per cache role but still want to purge more than
   one cache group.

A) rename

The rename adds deprecation notices in the comments and adds a back
compatibility layer in the case someone is already using this feature.
Given Wikimedia Foundation is not even using it, it is very unlikely,
but yet: better safe than sorry.

My logic is flawed sometime, so that needs a bit of review :) There is
two levels of deprecations to watch for:
- pre mw1.20 which useds $wgHTCPMulticastAddress and
  $wgHTCPMulticastPort
- pre mw1.22 (aka before this patch) that used $wgHTCPMulticastRouting

The resulting configuration should be properly loaded in $wgHTCPRouting.

B) multi hosts

The HTCP routing let you split purges to different hosts according to
the URL.  In some case, we want to be able to purge an URL from more
than one multicast group.  A Wikimedia example would be to send text
related purges to the text and mobiles caches while upload purges are
sent to the upload caches.

An abstracted example would be:

$wgHTCPRouting = array(

// upload URLs to upload caches
'/(upload|thumbs)/' => array(
'host' => '<ip for upload caches>'
),

// Everything else to text & mobile
'' => array(
array( 'host' => '<ip for text caches>' ),
array( 'host' => '<ip for mobile caches>' ),
),

);

Change-Id: Ie87f6b81007f47f9cb439371743f3ad9a4b0c774
RELEASE-NOTES-1.22
includes/DefaultSettings.php
includes/Setup.php
includes/cache/SquidUpdate.php