MediaWiki already exposes the most lagging server in the wiki.php
(called from index.php):
Any reason to hide others? Either we should hide all the db servers,
or expose them all?
function checkMaxLag( $maxLag ) {
global $wgLoadBalancer;
list( $host, $lag ) = $wgLoadBalancer->getMaxLag();
if ( $lag > $maxLag ) {
header( 'HTTP/1.1 503 Service Unavailable' );
header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) );
header( 'X-Database-Lag: ' . intval( $lag ) );
header( 'Content-Type: text/plain' );
echo "Waiting for $host: $lag seconds lagged\n";
return false;
} else {
return true;
}
}
On 7/9/07, Brion Vibber <brion(a)wikimedia.org> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
yurik(a)svn.wikimedia.org wrote:
+ list( $host, $lag ) =
$wgLoadBalancer->getMaxLag();
+ $data[] = array (
+ 'host' => $host,
+ 'lag' => $lag);
While we're happy to tell everyone the hostnames of our own database
servers here at Wikimedia, as a general rule this would be considered an
information disclosure vulnerability.
- -- brion vibber (brion @
wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFGkomhwRnhpk1wk44RAsOfAKCK6dv3YzvLzk9qOfmC9c1QRTpWtgCfb0K/
HLgK0roZb/p315oG1jXfl7A=
=FwHS
-----END PGP SIGNATURE-----
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l