view page source - page history - about editing

Revision History: Setting up Master/Slave Replication from an existing MySQL server

This is revision 470 of the page Setting up Master/Slave Replication from an existing MySQL server, as it appeared on Wed, 16 Apr 2014 20:35:24 -0700.

Currently is running off a single MySQL server. I want to switch this to a master/slave setup, which I intend will:
  1. increase performance (0.10% of queries are blocked by updates), but not too much since the database is very write-heavy (59% of queries)
  2. increase visible performance greatly (often graphs are blocked by pending writes especially to summary_instances and balances tables)
  3. improve reliability (if the slave goes down, I can point web servers to master; if the master goes down, I can enable read-only site mode)
  4. cost more money to run (since I'll be running two nodes rather than one) but still much cheaper (and more interesting) than going through S3
  5. databases suitable for memcachedb/keystores are not yet used that heavily
I'll be using the MySQL guide to set up replication and cover my steps here.

1. Setup master Setting the Replication Master Configuration
  1. Edit my.cnf and set:
log-bin=mysql-bin            # enable binary logging
server-id=1                  # this ID cannot be used by any other server
# Restart server

2. Setup slave

  1. Purchase new Linode.
  2. Set up MySQL, iptables and SSH appropriately.
  3. Tune mysql
Categories: MySQL

view page source - what links to here? - page history - top
Last edited by jevon jevon 60 months ago