Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎中文
LoadBalancer settings: $wgLBFactoryConf
Load balancer factory configuration.
Introduced in version: 1.13.0 (r32578)
Removed in version: still in use
Allowed values: (array)
Default value: array( 'class' => 'LBFactorySimple' )
Other settings: Alphabetical | By function


To set up a multi-master wiki farm, set the class here to something that can return a Wikimedia\Rdbms\LBFactory with an appropriate master on a call to getMainLB(). The class identified here is responsible for reading $wgDBserversManual:$wgDBservers, $wgDBserverManual:$wgDBserver, etc., so overriding it may cause those globals to be ignored.

The Wikimedia\Rdbms\LBFactoryMulti class is provided for this purpose, the configuration for this class is provided below:

Warning Warning: If you use this class, all previous settings like $wgDBserversManual:$wgDBservers, $wgExternalServersManual:$wgExternalServers, ... will be ignored.
A map of database names to section names
A 2-d map. For each section, gives a map of server names to load ratios. For example: array( 'section1' => array( 'db1' => 100, 'db2' => 100 ) )
A server info associative array as documented for $wgDBservers. The host, hostName and load entries will be overridden.
A 3-d map giving server load ratios for each section and group. For example: array( 'section1' => array( 'group1' => array( 'db1' => 100, 'db2' => 100 ) ) )
A 3-d map giving server load ratios by DB name.
A map of hostname to IP address.
A map of external storage cluster name to server load map
A server info structure used for external storage servers
A 2-d map overriding mainTemplate or externalTemplate on a server-by-server basis.
A 2-d map overriding externalTemplate by cluster
An override array for mainTemplate and externalTemplate for all master servers.

Wikimedia configuration[edit]

To see how Wikimedia uses $wgLBFactoryConf to configure its wikis see:

Wikimedia configuration uses also $wgCdnReboundPurgeDelayManual:$wgCdnReboundPurgeDelay.