Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
Con fab lightning a wells
Next
Download to read offline and view in fullscreen.

1

Share

Download to read offline

Scaling your App with MySQL Replication

Download to read offline

Brief introduction to using MySQL Replication to scale your application

Related Books

Free with a 30 day trial from Scribd

See all

Scaling your App with MySQL Replication

  1. 1. Scaling with MySQL Replication Simon McCartney simon@mccartney.ie @simonmcc
  2. 2. MySQL • MySQL - the M in the LAMP stack • open source • flexible • multi-user • multi-engine • I’m going to talk primarily about 5.0.50ish
  3. 3. What are you trying to solve? • bottle neck? • read or write? • location • availability?
  4. 4. MySQL Replication • Increase select query capacity • Improve data localilty for multi-site environments • Categorise & Prioritise Queries • Bring unknown weirdness
  5. 5. How? • Queries get • tagged with the origin server-id • added to the bin-log • Slave pulls bin-logs, executes queries • also adds to local bin-log
  6. 6. Master/Slave MySQL MySQL MySQL query replication MySQL MySQL Master Slave Slave Slave Slave Writes Reads App
  7. 7. Master/Master query replication MySQL MySQL Master Master query replication read & write read & write App
  8. 8. Hub & Spoke
  9. 9. I have multiple database servers, now what? • select servers at app level • proxy (MySQL Proxy, Zeus ZXTM) • Round Robin DNS
  10. 10. Gotchas • Replication - running & lag? • binlog retention • don’t replicate certain commands
  11. 11. Tools • live topology diagram (perl, GraphViz) • server weighting (memcached & app/proxy) • scripted reseed you’ll do this more often than you expect also handy for building staging/sandboxes
  12. 12. each node here is You can MySQL get really instance crazy
  13. 13. Pretty Pictures communicate issues quicker
  14. 14. Thank you for listening!
  • tianhaoluan

    Jun. 8, 2014

Brief introduction to using MySQL Replication to scale your application

Views

Total views

2,134

On Slideshare

0

From embeds

0

Number of embeds

17

Actions

Downloads

23

Shares

0

Comments

0

Likes

1

×