[TYPO3-dev] Can some page ID point to another database?

R. van Twisk typo3 at rvt.dds.nl
Sun Jan 28 01:35:23 CET 2007


Elmar Hinz wrote:
>> I was wondering is it possible to mix data from several databases when
>> building page hierarchy?
>>
>>     
> [...] 
>   
>> Regards,
>> John
>>     
>
> Hi John,
>
> Your model is interesting, but I guess the answer is no. I think it would
> require work on the core to implement that system. Why not using
> established methods of load balancing first? Caching headers, squid, table
> indices, proper caching plugins, ...
>
> As a workaround for your model you could think of unidirectional mirroring
> of a central DB. 
>
>
> common stuff                 local stuff
>     |                             |
>     v                             V
>
> dbCentral      > export >      dbLocal
>
>
> You will need to make sure that you don't get conflicts with the IDs of
> the tables. You could try to force to store local stuff in an own range of
> IDs, say allways above 1.000.000.
>
> Regards
>
> Elmar
>
>
>
>
>   
Problems with the ID basically works,
however since mysql works with a auto increment and not with a serial
that would be extremely hard to implement.

What you can do is setup a mysql cluster. And in your localconf.php
setup a switch that can point to different database server (or local).

Within the switch you check some variable that has been set by the 
loadbalancer
and points to the correct least less loaded server.

Ries


-- 
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web:   http://www.rvantwisk.nl/freelance-typo3.html
skype: callto://r.vantwisk






More information about the TYPO3-dev mailing list