[HyperDB] Active Master and Passive Master with binaryreplication
Nick White
nwhite at bankrate.com
Tue Sep 28 14:24:42 UTC 2010
Jason, Andy,
Just to toss in my 2 cents, I currently use HyperDB in nearly this same
scenario with with a multi-master setup and it is working beautifully.
My setup contains a similar configuration as to Andy's prev suggestion
of making db2 contain 'write'=>2 so it is seen basically as a fail-over
for db1.
Thanks,
Nick
On Tue, 2010-09-28 at 10:15 -0400, Andy Skelton wrote:
> Hi, Jason,
>
> Jason Ashdown <Jason.Ashdown at futurenet.com> wrote:
> > As soon as we disable the Active Master (db1) HyperDB spits out
> errors like "No databases available with wp_4_options (global)".
>
> This is the code that spits out that error:
>
> if ( empty($this->hyper_servers[$dataset][$operation]) )
> return $this->bail("No databases available with $this->table
> ($dataset)");
>
> $operation is either "read" or "write". If you disable db1 in your
> config (I'm guessing this is what you did), you are left with db2
> which is configured for read only, not for write. If db2 is supposed
> to receive reads when db1 is disabled, your config must reflect that.
>
> You might try configuring db2 with 'write' => 2. In case your
> configuration needs to change dynamically when the db status changes,
> you can make your configuration dynamic. One way is to have multiple
> configurations in conditional blocks.
>
> I have not tested HyperDB with DRBD or any other multi-master setup.
> However, I did intend for HyperDB to provide the same sort of failover
> for writes that it does for reads. I'll be curious to see how you make
> it work.
>
> Cheers,
> Andy
> _______________________________________________
> HyperDB mailing list
> HyperDB at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/hyperdb
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
>
More information about the HyperDB
mailing list