[HyperDB] Re: HyperDB Digest, Vol 15, Issue 1

Emiliano Compean e.bardomiano at gmail.com
Thu Apr 16 17:05:03 GMT 2009


If the slave is bypassed after a write to the master (for a particular
dataset), does hyperdb reset itself after some time? Or will it just
continue doing reads from the master indefinitely?

On Tue, Apr 7, 2009 at 8:00 AM, <hyperdb-request at lists.automattic.com>wrote:

> Send HyperDB mailing list submissions to
>        hyperdb at lists.automattic.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.automattic.com/mailman/listinfo/hyperdb
> or, via email, send a message with subject or body 'help' to
>        hyperdb-request at lists.automattic.com
>
> You can reach the person managing the list at
>        hyperdb-owner at lists.automattic.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of HyperDB digest..."
>
>
> Today's Topics:
>
>   1. separating reads and writes (Emiliano Compean)
>   2. Re: separating reads and writes (Andy Skelton)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 6 Apr 2009 13:27:08 -0400
> From: Emiliano Compean <e.bardomiano at gmail.com>
> Subject: [HyperDB] separating reads and writes
> To: hyperdb at lists.automattic.com
> Message-ID:
>        <a6111b820904061027o7d87cc61lb45fd1119abe3562 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> We have a cluster of wordpress front-end servers and want to separate reads
> and writes between mysql master and slave servers.
>
> In my db-settings.php file I have something like:
>
> //read db server
> add_db_server('global', 0, 'lan', 1, 0,'192.168.0.83:3306','
> 192.168.0.83:3306','xxxx','xxxx','xxxx');
>
> //write db server
> add_db_server('global', 0, 'lan', 0, 1,'192.168.0.40:3306','
> 192.168.0.40:3306','xxxx','xxxx','xxxx');
>
>
> So basically, I want all reads to go to one server and writes to another.
> Is this correct?
> In my testing, I'm using MONyog (www.webyog.com) to compare usage stats
> between the servers.  In this config, the charts show  reads
> still going to my master server. This is why I would like to confirm that
> my
> configuration or expectations are correct.
>
> thanks!!!
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 6 Apr 2009 12:41:50 -0500
> From: Andy Skelton <skeltoac at gmail.com>
> Subject: Re: [HyperDB] separating reads and writes
> To: hyperdb at lists.automattic.com
> Message-ID:
>        <e6ec604d0904061041k1fa81e22h764aae1e5aa5adbf at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Mon, Apr 6, 2009 at 12:27 PM, Emiliano Compean
> <e.bardomiano at gmail.com> wrote:
> > So basically, I want all reads to go to one server and writes to another.
> > Is this correct?
>
> This is generally correct but your write-only server will still be
> sent read queries sometimes. Due to inevitable lags in replication, we
> designed HyperDB to read from the write database after any writes.
> This prevents the application reading a previous version of row
> written during the same page load.
>
> The current implementation keeps track of which datasets have received
> writes. It then bypasses the slaves for all subsequent reads on those
> datasets.
>
> Cheers,
> Andy
>
>
> ------------------------------
>
> _______________________________________________
> HyperDB mailing list
> HyperDB at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/hyperdb
>
>
> End of HyperDB Digest, Vol 15, Issue 1
> **************************************
>


More information about the HyperDB mailing list