dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
mysql Reference Architecture
RPO: 0 (Grup Konsensüsü)
RTO: < 10 saniye (Otomatik Primary Seçimi)

MySQL InnoDB Cluster + Group Replication + MySQL Router Topology

Native MySQL high-availability architecture driven by Paxos group replication protocol. Runs in single-primary mode to eliminate write conflicts and routes traffic transparently via MySQL Router.

Components:MySQL ShellMySQL RouterGroup ReplicationInnoDB Storage EngineMySQL Enterprise Backup
Architecture Topology & Flow Diagram
MySQL InnoDB Cluster + Group Replication + MySQL Router Reference Architecture Diagram (Single-Primary Mode)

📌 MySQL InnoDB Cluster + Group Replication + MySQL Router Reference Architecture Diagram (Single-Primary Mode)

Topology Blueprint
3x MySQL Enterprise / Community Node + 2x MySQL Router + Paxos Quorum
Client Ingress & Routing Flow
11. Application Layer & Router

Web, Mobile, and Analytics clients connect to MySQL Router on port 6446 (R/W) and port 6447 (R/O).

22. Metadata Cache Dynamic Routing

MySQL Router maintains a live metadata cache of cluster topology to dispatch read and write traffic without client reconfiguration.

33. Group Replication & Certification (Paxos)

In Single-Primary mode, transactions are certified through the Paxos consensus layer before committing on secondary nodes.

Automated Failover & Quorum Sequence
11. Primary Failure Detection

When primary node drops, remaining Group Replication members acknowledge departure via automated membership protocol.

22. Automatic New Primary Election

The secondary instance with highest member_weight and lowest transaction lag is promoted to PRIMARY within <10 seconds.

33. Transparent Router Redirection

MySQL Router detects the cluster state change immediately and redirects port 6446 write traffic without application restarts.

Production Config Blueprint
# MySQL InnoDB Cluster Shell Creation
dba.createCluster('prodCluster', {
  ipWhitelist: '10.0.1.0/24',
  memberWeight: 50,
  consistency: 'AFTER'
});

cluster.addInstance('root@10.0.1.12:3306', {
  recoveryMethod: 'clone'
});
cluster.addInstance('root@10.0.1.13:3306', {
  recoveryMethod: 'clone'
});

# Küme Durumu Kontrolü
cluster.status();
Cluster Health & Triage CLI
mysqlsh root@10.0.1.11:3306 -- cluster status
SELECT * FROM performance_schema.replication_group_members;
SELECT * FROM performance_schema.replication_group_member_stats;
Pros & Strengths
  • •Official native MySQL solution
  • •No external consensus daemon required
  • •Streamlined cluster management via MySQL Shell API
Cons & Constraints
  • •Minimum 3 node quorum requirement
  • •Strict requirement for InnoDB tables and primary keys
Pre-Prod Checklist
  • Every table must have an explicit PRIMARY KEY and use the InnoDB storage engine.
  • Cluster must consist of at least 3 nodes (odd number recommended to maintain Paxos quorum).
  • `binlog_format=ROW` and `gtid_mode=ON` must be enabled across all cluster instances.
  • Deploy at least 2 MySQL Router instances alongside application nodes for router redundancy.