[wp-hackers] Allow Wordpress to use a Slave Database

Joseph Scott joseph at randomnetworks.com
Tue Jun 3 16:09:54 GMT 2008


On Jun 3, 2008, at 9:51 AM, Andy Skelton wrote:

> On Tue, Jun 3, 2008 at 9:59 AM, Colin Ogilvie
> <wordpress at colinogilvie.co.uk> wrote:
>> I'd thought about using that, but I'd rather see it implemented in  
>> the
>> core than having to use different plugins and other DB files  
>> which, as
>> you said, start to lag behind the core.
>
> I agree. I'd like to see WPDB gain simple slave awareness without
> sacrificing anything for single-db installs. If you do it, I hope you
> do it as a core patch with those goals met. Ping me if you need help.


I second Andy's suggestion.  I was looking at the Hyper DB source  
again just last week, with idea of making the core WordPress database  
class write versus read aware.

This was the idea I was considering:

	- Be able to configure 1 (or more?  multi-master?) MySQL database  
that writes are sent to
	- Define 1 or more (array) of MySQL database servers to send reads to
	- This should require zero changes to queries, plugins, other core  
files/code beyond the database class and config info above

That last requirement is something that Hyper DB does by inspecting  
the queries to determine if they will perform a write.  My suggestion  
would be to take the useful bits from Hyper DB and add them to the  
core WordPress database class.

	http://svn.wp-plugins.org/hyperdb/trunk/


--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/






More information about the wp-hackers mailing list