Codeigniter: Separating reads and writes for scaling MySQL

Posted on the August 6th, 2009 under Codeigniter, Programming by Suku

Generally websites average a ratio of 9:1 or more for reads:writes for their applications which makes MySQL replication as one of the ways to scale you web application. The simplest configuration is to separate reads and writes with all the reads coming from the slave servers.

…continue reading Codeigniter: Separating reads and writes for scaling MySQL

How to skip MySQL replication counter

Posted on the October 7th, 2008 under MySQL, Systems by Suku

There are such times when MySQL replication stops when you run certain updates on the master and the slave fails. Like for example you may have run a create table or an alter table on the master and further inserts but these DDLs get skipped and the inserts into these non-existent tables cause the slave to error out and stop.

A simple way out of this is to run the missing DDLs on the slave and push the counter by a step. This is not recommended as this might cause data inconsistency.
…continue reading How to skip MySQL replication counter