You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I cannnot figure out how to put the code of Network topology / Datacenter awareness #48
Hi @xianx . I am not sure what you are asking for here. Can you give me more detail.
This drop-in is just a tool to enable you to build your own rules on how you contact databases.
The suggested way to handle this is to use db-config & set the servers like:
$wpdb->add_database(array(
'host' => '127.0.0.1',
'user' => 'some user',
'password' => 'somepw',
'name' => 'db_',
'write' => 1,
'read' => 5,
'dataset' => 'global',
'timeout' => 0.5,
));
And the setting the read/write accordingly for each datacenter. Thus you can steer traffic within or among multiple datacenters.
datacenters are from hyperdb, but is not (fully) implemented in ludicrousdb since it doesn't really make sense as it just complicates stuff & it can be simply set with the read/write priority
also add_db_server in ludicrous is called ldb_add_db_server
Activity
spacedmonkey commentedon Jan 4, 2018
Hi @xianx . I am not sure what you are asking for here. Can you give me more detail.
This drop-in is just a tool to enable you to build your own rules on how you contact databases.
xianx commentedon Jan 6, 2018
In db-config.php there is an example of Network topology / Datacenter awareness see the screenshot http://prntscr.com/hwskkp
But no explanation how to use it in code with add_db_server function http://prntscr.com/hwsmnw
Please help.
kkmuffme commentedon Nov 8, 2018
The suggested way to handle this is to use db-config & set the servers like:
$wpdb->add_database(array(
'host' => '127.0.0.1',
'user' => 'some user',
'password' => 'somepw',
'name' => 'db_',
'write' => 1,
'read' => 5,
'dataset' => 'global',
'timeout' => 0.5,
));
And the setting the read/write accordingly for each datacenter. Thus you can steer traffic within or among multiple datacenters.
datacenters are from hyperdb, but is not (fully) implemented in ludicrousdb since it doesn't really make sense as it just complicates stuff & it can be simply set with the read/write priority
also add_db_server in ludicrous is called ldb_add_db_server