MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

MySQL 5.5 Replication Enhancements – An Overview (FOSDEM 2011)

  1. 1. <Insert Picture Here>MySQL 5.5 Replication Enhancements – An OverviewLenz GrimmerMySQL Community Relations Specialist
  2. 2. Semi-synchronous Replication• Improves replication resilience and failover reliability• Designed as a plugin• COMMITs on the master node are acknowledged only when at least one slave has logged the event in the relay log• Data is not lost in case of failover
  3. 3. Replication Heartbeat• Message sent at regular intervals from master node to slave nodes• Avoids spurious relay log rotation when master node is idle• Heartbeats are sent only if there are no more unsent events in the binlog file• If message is not received, slave knows that master node has failed
  4. 4. Replication Slave fsync() Options• Fine tune relay logs and {master|relay- log}.info fsync operations• Reduces potential file corruption when slave crashes• Three new parameters to configure how often IO and SQL threads will issue file sync
  5. 5. Automatic Relay Log Recovery• Ensures master/slave consistency on restart• Slave automatically discard its own unprocessed relay logs• Recovers pending transactions from the originating master
  6. 6. Per-master Event Filtering• MySQL slave can discard events coming from a specific master• CHANGE MASTER now supports IGNORE_SERVER_IDS = ... to configure which events should be discarded• Useful in circular replication topologies
  7. 7. Replication Slave Side Type Conversions• Row-based replication between columns with different types was limited• Type promotion and demotion is now supported• Examples: – Replicate seamlessly from TINYINT column on master to INT column on the slave – Or CHAR(10) column to a VARCHAR(20) column – Or even from TEXT column to VARCHAR(20) column
  8. 8. Individual Log Flushing• Users can now selectively flush server logs with FLUSH LOGS• Before, every time users wanted to flush such logs, other server logs would flush as well• Now users can specify which individual log to flush by providing the log type as an argument to the FLUSH LOGS command
  9. 9. SHOW RELAYLOG EVENTS• You can now show relay log contents, as you would do for the binlogs• Useful for comparing events on the master binlog against the slave relay log• Easier to inspect the binary and relay logs on servers that act both as master and slave in chained replication topologies• May also be used to diagnose relay log corruption
  10. 10. Give it a spin!• Download MySQL 5.5 from the usual place:• Send us feedback and bug reports:• Questions? Use the Forums or Mailing Lists:|• Blog about your experiences:
  11. 11. Discussion / Q & A
  12. 12. Thank you!Lenz Grimmer <> @lenzgr