[HyperDB] Question

Brian Layman hyperdb at thecodecave.com
Thu Nov 3 17:11:21 UTC 2016


On 11/3/2016 9:29 AM, Ariful Islam wrote:
> I don't fine any tutorial about this plugin...
> I want to create many databases and balance the load how can i do it with
> hyperdb
Wow... I haven't seen a message come across this message board for a 
long time. I had to re-configure my mail client so that I could reply!

HyperDB will do what you want.  You must configure MySQL to handle the 
replication, but HyperDB will allow your WordPress install to access 
multiple databases.

Here are to relatively recent tutorials to guide you through this process:
1. 
https://torbjornzetterlund.com/how-to-setup-a-mysql-replication-database-for-wordpress/
2. 
http://net-load.com/how-to-setup-mysql-database-master-and-slave-with-hyperdb-on-wordpress/

Both of those articles, at a glance, seem to be fairly accurate and they 
should do what you need.

Here are some of my own tips for you:
1. Only do this when it is proven that you need to do this. Don't 
complicate your set up if you don't absolutely have proof that you have to.
2. Before you switch to HyperDB, make certain that you have eliminated 
any extra DB writes in your code. If you are writing to the database 
when you don't need to be, eliminating that may solve all of your 
database headaches.
3. Make certain that once replication is configured, that all of your 
slave database are receiving changes in a timely fashion.  One of the 
worst things to debug is why some visitors to your site get one set of 
data and others get another.
4. If you also have multiple webheads, use a caching solution for page 
caching and micro-caching that is accessible to all of your servers.  
Allow the work on one server to be a benefit of all of your servers.
5. Also if you have multiple webheads, beware of the use of state 
conditions like sessions and transients that if not implemented 
correctly could exist on one server, but not be carried over to others.

That's my advice of the morning.  Hope that helps!
Brian Layman
eHermit


More information about the HyperDB mailing list