Project

General

Profile

Actions

Feature #17544

closed

Round Robin for native MySQL SELECT queries

Added by Marcel Alburg over 17 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2007-08-20
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

I've create a Patch (just a proof-of-concept) to Cluster the Select Statements from Typo3.

You can enter in localconf.php multiple slave servers. This servers will be selected by rand(0, [amount of slave servers]). I add a "dead File" to disable a slave server (in case of emergency or planned downtime). This file must be remove by hand from admin.

It's possible to create this deadFile by hand (in case "out-of-sync" of the slave db servers).

In the backend, the normal master server will be used.

Proof-of-Concept

----
$TYPO3_CONF_VARS['SYS']['slave_db_handler'][] = array(
'typo3_db' => 'db',
'typo3_db_host' => 'slave01',
'typo3_db_password' => 'geheim',
'typo3_db_username' => 'user',
'dead_file' => 'typo3conf/slave01_db_dead'
);

$TYPO3_CONF_VARS['SYS']['slave_db_handler'][] = array(
'typo3_db' => 'db',
'typo3_db_host' => 'slave02',
'typo3_db_password' => 'geheim',
'typo3_db_username' => 'user',
'dead_file' => 'typo3conf/slave02_db_dead'
);
----
(issue imported from #M6180)


Files

round_robin_mysql_select.diff (2.58 KB) round_robin_mysql_select.diff Administrator Admin, 2007-08-20 22:29
Actions

Also available in: Atom PDF