Title: Master failover
Last modified: September 1, 2016

---

# Master failover

 *  [ysticeri](https://wordpress.org/support/users/duckdagobert/)
 * (@duckdagobert)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/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)
 * [https://wordpress.org/plugins/hyperdb/](https://wordpress.org/plugins/hyperdb/)

The topic ‘Master failover’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/hyperdb_33353d.svg)
 * [HyperDB](https://wordpress.org/plugins/hyperdb/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hyperdb/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hyperdb/)
 * [Active Topics](https://wordpress.org/support/plugin/hyperdb/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hyperdb/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hyperdb/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [ysticeri](https://wordpress.org/support/users/duckdagobert/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/master-failover/)
 * Status: not resolved