Master failover
-
When slave is not available, it will automatically check the next reads.
Would this also works for writes?
e.g.
$wpdb->add_database(array(
‘host’ => ‘ip’, // This is master IP
‘user’ => ‘user’,
‘password’ => ‘password’,
‘name’ => ‘de_’,
‘write’ => 1,
‘read’ => 0,
‘dataset’ => ‘global’,
‘timeout’ => 0.2,
));$wpdb->add_database(array(
‘host’ => ‘ip2’, // This is backup master
‘user’ => ‘user’,
‘password’ => ‘password’,
‘name’ => ‘de_’,
‘write’ => 10,
‘read’ => 0,
‘dataset’ => ‘global’,
‘timeout’ => 0.2,
));So if ip master fails, it will check ip2 master? (bc IP2 master is only writeable if ip master fails, else it is just a slave per our configuration)
- The topic ‘Master failover’ is closed to new replies.