MySQL × Cloud-Native
The Age Gap
The Problem
MySQL was built for permanent, named servers. Kubernetes assumes everything is temporary. The mental models don't overlap.
Replication, storage, failover, and connection routing all behave differently inside a cluster. The sharp edges are real.
Philosophical
db-primary.prod.local mysql-abc-7f9d2 Part 2
Replication · Storage · Failover · Networking
Problem
01
of many
When everything is allowed to fail — what happens to your database?
Then
Maintenance windows. Graceful failover. Expected behavior.
Now
Anything. Anytime. By design.
Classic primary → replica
Primary
mysql-0
accepts writes
binlog · async, with lag
Replica
mysql-1
always behind
Percona XtraDB Cluster · Galera
PXC
mysql-0
✓PXC
mysql-1
✓PXC
mysql-2
✓Problem
02
crash recovery
mysql-0
seqno
18
mysql-1
seqno
18
mysql-2
seqno
19
how it happens
regional outage power loss kubectl delete --allThe operator scans every pod, picks the leader, and the cluster picks itself back up.
operator
scans all pods
mysql-0
seqno
18
joinsmysql-1
seqno
18
joinsmysql-2
seqno
19
bootstrapProblem
03
backups & pitr
3am. The primary is gone. Where is your last transaction?
Backups
Snapshot. Schedule. Done.
PITR
Streamed. Continuously. From a cluster.
The naive way
PXC
mysql-0
PXC
mysql-1
PXC
mysql-2
S3 bucket
The answer
PXC
mysql-0
selected
mysql-1
oldest binlogs
PXC
mysql-2
PITR Pod
binlog-collector
S3