MySQL replication (all data everywhere; is it a good idea?) sarah novotny – sarah@bluegecko.net  MySQL and LAMP services w...
<ul><li>master/slave </li></ul><ul><li>master/relay slave/slave </li></ul><ul><li>active/passive multi-master </li></ul><u...
<ul><li>master/slave </li></ul>www .BlueGecko . net READ ONLY
<ul><li>Master/relay slave/slave </li></ul>www .BlueGecko . net READ ONLY READ ONLY
<ul><li>active/passive multi-master </li></ul>www .BlueGecko . net READ ONLY
<ul><li>active/passive multi-master </li></ul>www .BlueGecko . net READ ONLY
www .BlueGecko . net
<ul><li>active/active multi-master </li></ul>www .BlueGecko . net read/write read/write
www .BlueGecko . net And now we come to rings
<ul><li>rings </li></ul>www .BlueGecko . net read/write read/write read/write read/write
<ul><li>oh, my </li></ul>www .BlueGecko . net
<ul><li>oh, my </li></ul>www .BlueGecko . net Boston -> London -> DC -> Seattle ->
<ul><li>oh, my </li></ul>www .BlueGecko . net Boston -> London -> DC -> Seattle ->
<ul><li>oh, my </li></ul>www .BlueGecko . net n n application servers writable ring readable spokes
<ul><li>oh, my </li></ul>www .BlueGecko . net n application servers writable ring readable spokes
<ul><li>oh, my </li></ul>www .BlueGecko . net
<ul><li>challenges </li></ul><ul><li>good things </li></ul><ul><li>why 5.0 still </li></ul><ul><li>tools </li></ul>www .Bl...
<ul><li>challenges </li></ul><ul><li>when things go wrong, they go very, very wrong </li></ul>www .BlueGecko . net
<ul><li>challenges </li></ul>www .BlueGecko . net data drift
<ul><li>challenges </li></ul>www .BlueGecko . net application servers in one  datacenter may have  different data than ano...
<ul><li>challenges </li></ul><ul><li>scaling writes </li></ul>www .BlueGecko . net
<ul><li>good things </li></ul>www .BlueGecko . net never a dull moment
<ul><li>good things </li></ul>www .BlueGecko . net nearly  infinite read  scaling
<ul><li>good things </li></ul>www .BlueGecko . net 4 (usually) identical copies of data
<ul><li>why 5.0 still? </li></ul>www .BlueGecko . net replication bugs
<ul><li>why 5.0 still? </li></ul>www .BlueGecko . net
<ul><li>tools we use to manage </li></ul><ul><li>this insanity— </li></ul><ul><li>Innotop </li></ul><ul><li>maatkit </li><...
credits <ul><li>flickr </li></ul><ul><li>icons – timothymorgan </li></ul><ul><li>MySQL mints – jimwinstead </li></ul><ul><...
Blue Gecko and contact info <ul><li>[email_address] </li></ul><ul><li>[email_address] </li></ul><ul><li>@sarahnovotny </li...
Upcoming SlideShare
Loading in...5
×

all data everywhere

516

Published on

MySQL's replication system has been a core feature often touted for scaling (sort of) and redundancy (sort of). I'll describe a client's extensive use of MySQL replication (they have more than 200 MySQL instances replicating to one another) as a reference for the many uses and misuses of replication.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
516
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Not locked into proprietary space… many options. Based from the same code tree Lib mysql vs lib drizzle – licensing gotcha libmysql gpl libdrizz bsd drizzle Maria Our delta Google patches Percona xtradb
  • Google patches include a better malloc And completely changed locking
  • Choose 5.1 or 5.4 only if you need the featuresets.
  • Much performance pain come into play with lock contention
  • Understand
  • Understand
  • Understand
  • Understand
  • API SHOULD KNOW THE DIFF proxy as an option if API not possible. scale writes. write own interfaces? check on it. btree index larger than memory -- writes get _slow_ Memcached – good for short lived data and caching wafflegrid -- patches to mysql -- innodb bufferpool over memcached
  • LVM and slaves give easy opportunities for creating clones for testing
  • •❑ disk•❑memory•❑up/down•❑cachehit -- baseline defiinition•❑replication •❑ mktablesync•❑mkchecksum
  • all data everywhere

    1. 1. MySQL replication (all data everywhere; is it a good idea?) sarah novotny – sarah@bluegecko.net MySQL and LAMP services www .BlueGecko . net
    2. 2. <ul><li>master/slave </li></ul><ul><li>master/relay slave/slave </li></ul><ul><li>active/passive multi-master </li></ul><ul><li>active/active multi-master </li></ul><ul><li>rings </li></ul><ul><li>rings + reporting spurs + hot standbys + relay slaves + read slaves, oh my </li></ul>www .BlueGecko . net
    3. 3. <ul><li>master/slave </li></ul>www .BlueGecko . net READ ONLY
    4. 4. <ul><li>Master/relay slave/slave </li></ul>www .BlueGecko . net READ ONLY READ ONLY
    5. 5. <ul><li>active/passive multi-master </li></ul>www .BlueGecko . net READ ONLY
    6. 6. <ul><li>active/passive multi-master </li></ul>www .BlueGecko . net READ ONLY
    7. 7. www .BlueGecko . net
    8. 8. <ul><li>active/active multi-master </li></ul>www .BlueGecko . net read/write read/write
    9. 9. www .BlueGecko . net And now we come to rings
    10. 10. <ul><li>rings </li></ul>www .BlueGecko . net read/write read/write read/write read/write
    11. 11. <ul><li>oh, my </li></ul>www .BlueGecko . net
    12. 12. <ul><li>oh, my </li></ul>www .BlueGecko . net Boston -> London -> DC -> Seattle ->
    13. 13. <ul><li>oh, my </li></ul>www .BlueGecko . net Boston -> London -> DC -> Seattle ->
    14. 14. <ul><li>oh, my </li></ul>www .BlueGecko . net n n application servers writable ring readable spokes
    15. 15. <ul><li>oh, my </li></ul>www .BlueGecko . net n application servers writable ring readable spokes
    16. 16. <ul><li>oh, my </li></ul>www .BlueGecko . net
    17. 17. <ul><li>challenges </li></ul><ul><li>good things </li></ul><ul><li>why 5.0 still </li></ul><ul><li>tools </li></ul>www .BlueGecko . net
    18. 18. <ul><li>challenges </li></ul><ul><li>when things go wrong, they go very, very wrong </li></ul>www .BlueGecko . net
    19. 19. <ul><li>challenges </li></ul>www .BlueGecko . net data drift
    20. 20. <ul><li>challenges </li></ul>www .BlueGecko . net application servers in one datacenter may have different data than another for some amount of time
    21. 21. <ul><li>challenges </li></ul><ul><li>scaling writes </li></ul>www .BlueGecko . net
    22. 22. <ul><li>good things </li></ul>www .BlueGecko . net never a dull moment
    23. 23. <ul><li>good things </li></ul>www .BlueGecko . net nearly infinite read scaling
    24. 24. <ul><li>good things </li></ul>www .BlueGecko . net 4 (usually) identical copies of data
    25. 25. <ul><li>why 5.0 still? </li></ul>www .BlueGecko . net replication bugs
    26. 26. <ul><li>why 5.0 still? </li></ul>www .BlueGecko . net
    27. 27. <ul><li>tools we use to manage </li></ul><ul><li>this insanity— </li></ul><ul><li>Innotop </li></ul><ul><li>maatkit </li></ul><ul><li>MySQL proxy </li></ul><ul><li>cacti templates </li></ul><ul><li>nagios </li></ul>www .BlueGecko . net
    28. 28. credits <ul><li>flickr </li></ul><ul><li>icons – timothymorgan </li></ul><ul><li>MySQL mints – jimwinstead </li></ul><ul><li>license plate – severud </li></ul><ul><li>vodka – masochismtango </li></ul><ul><li>1 – sarahajohnson </li></ul><ul><li>arthur – sierratierra </li></ul><ul><li>drift – jarylcabuco </li></ul><ul><li>dull -- pagedooley </li></ul><ul><li>tools – meanestindian </li></ul><ul><li>other </li></ul><ul><li>special thanks to unnamed staff from my unnamed client for suggestions on content and slides </li></ul>www .BlueGecko . net flickr <ul><li>sadface – mlostracco </li></ul><ul><li>quadruplets – evilerin </li></ul><ul><li>reading – stevecadman </li></ul><ul><li>bugs -- bruneskine </li></ul>
    29. 29. Blue Gecko and contact info <ul><li>[email_address] </li></ul><ul><li>[email_address] </li></ul><ul><li>@sarahnovotny </li></ul><ul><li>@bluegecko </li></ul><ul><li>senk on #mysql </li></ul>www .BlueGecko . net Blue Gecko provides Remote DBA services for companies around the world 7x24x365 support including monitoring, performance analysis, proactive maintenance and architectural guidance for small and large datasets.
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×