Skip to content
Guides & References

MySQL high availability for rConfig

Make rConfig's MySQL database highly available with InnoDB Cluster and MySQL Router, or a primary/replica pair with orchestrated failover.

High AvailabilityUpdated
On this page

MySQL high availability for rConfig

MySQL holds rConfig’s devices, encrypted credentials, tasks, policies, users, compliance history and audit trail. rConfig connects to one endpoint and needs it to always reach the writable primary. This page covers the two common ways to make MySQL highly available for rConfig. MySQL is available on rConfig Pro and Enterprise.


What rConfig needs from the database tier

  • One endpoint in DB_HOST that always reaches the primary. rConfig doesn’t split reads and writes.
  • Failover without a change to rConfig. The HA tooling promotes a node and moves the endpoint; rConfig reconnects to the same address.
  • Every node sized like the primary, because after failover it carries the full load.

Two designs

InnoDB Cluster Primary/replica with orchestrated failover
How it works Three or more MySQL servers using Group Replication in single-primary mode. The group elects a new primary when the old one fails One primary and one or more replicas using MySQL replication. Orchestrator (or similar) detects a failed primary and promotes a replica
Endpoint for rConfig MySQL Router’s read/write port, which always reaches the current primary A VIP or proxy (ProxySQL, HAProxy) that the failover tool moves to the new primary
Data loss on failover None for committed writes: a write commits only when a majority of the group has it Asynchronous replication can lose the last transactions; semi-synchronous narrows that
Minimum nodes Three Two, plus the failover tool on its own host
MySQL version 8.0 or later Any supported version
Fits New deployments that can run MySQL 8.0 or later. The usual choice Existing replication set-ups, or older MySQL versions
Figure HA-11: active Node A and passive Node B each run MySQL Router on 127.0.0.1:6446; Router on Node A reaches primary mysql1 in a three-member InnoDB Cluster using single-primary Group Replication, managed with MySQL Shell; a side panel shows the primary/replica alternative with Orchestrator moving a VIP
Figure HA-11: MySQL high availability. InnoDB Cluster elects a primary, and MySQL Router follows it. Click the diagram to open the interactive version.

InnoDB Cluster with MySQL Router

InnoDB Cluster combines Group Replication, MySQL Shell (to build and manage the cluster) and MySQL Router (to route clients to the primary). In single-primary mode, only the primary takes writes; the group agrees on a new primary if it fails, and Router follows the change automatically.

Point rConfig at Router’s read/write port:

rConfig .env (excerpt)
DB_HOST=192.0.2.30
DB_PORT=6446

Port 6446 is MySQL Router’s default read/write port; check yours. Run Router on both rConfig nodes (each connecting to its local Router on 127.0.0.1), or on two hosts behind a VIP, so Router isn’t a new single point of failure.


Primary/replica with orchestrated failover

If you already run MySQL replication, keep it and add automatic failover:

  • Orchestrator watches the replication topology, promotes the best replica when the primary fails, and repoints the others. Hooks move the VIP, or update ProxySQL, so rConfig’s endpoint follows.
  • Semi-synchronous replication makes the primary wait until at least one replica has a transaction before confirming it, which narrows what a failover can lose.

Operating it

  • Watch replication lag and, on InnoDB Cluster, the group’s member states.
  • Back up independently. Replication copies a dropped table to every node in seconds. Keep rConfig’s own backups and MySQL backups (MySQL Shell dump utilities, Percona XtraBackup or similar).
  • Test failover by stopping the primary during a quiet period, and check rConfig recovers without intervention.

Type to search.