Menu

Getting Started with MOCO Part 3: When MySQL Replicas Fail — Understanding Semi-Synchronous Replication
📰

Getting Started with MOCO Part 3: When MySQL Replicas Fail — Understanding Semi-Synchronous Replication

DEV Community: kubernetes·Mucheru Maina·14 days ago
#uky2gkfG
Reading 0:00
15s threshold

The MySQL primary was still running. Applications could reach the database. Yet some write requests were taking too long and timing out.

The problem wasn't a missing primary. Both replicas had stopped replicating, and semi-synchronous replication had become part of the availability problem.

In Part 1 , I covered deploying MySQL with MOCO. Part 2 covered backups, MinIO, and a davfs2 failure. This time, let's look at the replication behavior that matters when things go wrong.

The three-instance cluster

MOCO uses GTID-based semi-synchronous replication for its normal three-instance MySQL clusters: one writable primary and two read-only replicas.

Application | v eks-db-1 PRIMARY | binary log events / \ v v eks-db-0 eks-db-2 REPLICA REPLICA \ / replication ACK

Enter fullscreen mode

Exit fullscreen mode

With asynchronous replication, the primary can acknowledge a committed transaction to the application without waiting for any replica to confirm receipt.

With semi-synchronous replication, the primary…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.