In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Relationship Graph View Issue ] Dependency Graph ]
related to child of duplicate of

Viewing Issue Simple Details
ID Category Type Reproducibility Date Submitted Last Update
0000576 [In-Portal CMS] Database feature request always 2010-02-08 18:40 2012-07-25 05:33
Reporter Dmitry View Status public  
Assigned To alex
Priority normal Resolution fixed  
Status closed      
Summary 0000576: Separating Database Master/Slave Requests
Description Add ability to have MASTER/SLAVE(s) configuration. This will separate WRITE/READ database requests between 2 servers.

1. all Admin requests go to MASTER
2. all Front READ requests go to SLAVE
3. all Front WRITE requests go to MASTER
4. all Front Search READ go to MASTER

For live examples refer to VO project.

In the future, we'd like to add function for have a Pool of Slaves servers.

--------

To enable load balancing:
1. add $_CONFIG['Database']['LoadBalancing'] = '1'; to /system/config.php file
2. create /system/db_servers.php file with following content:

<?php

$_CONFIG['Databases'] = Array (
    Array (
        'DBHost' => 'slave.host1',
        'DBUser' => 'slave.user1',
        'DBUserPassword' => 'slave.user.password1',
        'DBLoad' => 1,
    ),
    Array (
        'DBHost' => 'slave.host2',
        'DBUser' => 'slave.user2',
        'DBUserPassword' => 'slave.user.password2',
        'DBLoad' => 1,
        'DBMaxLag' => 15, // optional, slave replication delay in seconds
        'DBMaxThreads' => 100, // optional, when slave thread count is above this number, then it won't be used
    ),
);

3. only slave servers are listed in file above, since database server defined in /system/config.php is considered as master server for backwards compatibility.


See http://www.mediawiki.org/wiki/Manual:$wgDBservers for more details.
Additional Information Database name isn't mentioned in slave server configuration, since it's must much during replication anyway.


Additional notes in In-B 23001



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker