DRBD and MySQL - Excellent Low-cost HA Solution | Linux Today

DRBD and MySQL – Excellent Low-cost HA Solution

Written By
Web Webster
Web Webster
Dec 11, 2009

“HA with MySQL Replication

“MySQL high availability is often implemented with its in-built
replication technology. The standard master-slave configuration
provides one database as the primary, receiving all write traffic
that is all changes to data. Read traffic, i.e. SELECT queries, can
be sent to the primary or to the replicated slaves. Transactions
flow on the primary database into its binary log. The slave keeps a
watchful eye on the primary, copying new transactions into its own
relay log. Keep in mind until 5.1 this involved copying the
*actual* SQL statements albeit in binary form. Once they make it to
the slave database, another thread then applies those SQL
statements in a serial fashion thus theoretically keeping that
slave in the same state as the primary.

“The trouble comes when your replication stops, and the error
log shows some funny error about duplicate keys or failed primary
key constraint. How’s that possible? If all the same transactions
are being applied in serial, the two databases should never have a
case like this. Strange indeed. It turns out that as we all know, a
lot of things can happen when a query executes to interrupt it or
cause otherwise anomalous behavior.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.