Auto-Clustering
MariaDB / MySQL / Percona Auto-Clustering
Auto-clustering provides an out-of-the-box way to create highly available MariaDB, MySQL, and Percona database clusters. The platform automates replication setup, node discovery, load balancing, failover handling, and scaling through the topology wizard.
Auto-Clustering Benefits
Enable Automatic Clustering
Click New Environment and choose MariaDB, MySQL, or Percona. Enable Auto-Clustering to display the supported replication schemes.

| Database | Available Replication Schemes |
|---|---|
| MariaDB | Primary-Secondary, Primary-Primary, Galera |
| MySQL | Primary-Secondary, Primary-Primary |
| Percona | Primary-Secondary, Primary-Primary, XtraDB |
Auto-Clustering Options
Highly Available ProxySQL Load Balancer
Each auto-clustering solution includes two ProxySQL nodes by default. They can be excluded before installation, but not afterward.

Database Cluster Access Credentials
The platform generates database credentials automatically. To override them, open Variables and define DB_USER and DB_PASS, then click Apply.


Cluster Horizontal Scaling
For Primary-Secondary or Primary-Primary clusters, an additional node is created by cloning an existing secondary. After cloning, it catches up through binary-log replay.
Cluster Layer Isolation
Use SLB access to decide which cluster layers are exposed externally: all required layers or only the ProxySQL entry-point layer.


Database Cluster Access Information
After successful installation, the platform emails access information for phpMyAdmin on the primary node, the cluster entry point, and the ProxySQL web panel.

The ProxySQL entry-point hostname follows:
proxy.${envName}.${platformDomain}

mysql_users table on every ProxySQL node or they will not be able to authenticate through the proxy layer.MYSQL_PWD=admin mysql -h 127.0.0.1 -P6032 -uadmin -e "INSERT INTO mysql_users (username,password,default_hostgroup) VALUES ('<username>', '<password>', 2);"
MYSQL_PWD=admin mysql -h 127.0.0.1 -P6032 -uadmin -e "LOAD MYSQL USERS TO RUNTIME; SAVE MYSQL USERS TO DISK;"

What Replication Type to Choose?
Primary-Secondary
Primary-Secondary uses one write node and one or more read replicas. It offers low write latency and strong read scaling. The source documentation notes that it does not provide automatic failover when the primary fails.
- High performance for read requests
- Backups can run on secondaries without loading the primary
- Analytical queries can run on secondaries
Primary-Primary
Primary-Primary asynchronous replication uses two primary nodes simultaneously. It balances write load and simplifies recovery when one primary fails. New secondary nodes are distributed between the two primaries when the cluster is scaled.
MariaDB Galera and Percona XtraDB
Galera and XtraDB provide synchronous multi-primary replication. Applications can send reads and writes to any node, node changes are automated, and the synchronous model minimizes replication delay and inconsistent data copies.
Expected Result
A MariaDB, MySQL, or Percona cluster is created with the selected replication topology, optional SLB exposure, generated or custom credentials, and ProxySQL load balancing when retained. Applications connect through the cluster entry-point hostname sent by the platform.
Important Notes
- ProxySQL is enabled by default and can only be excluded before installation.
- Supported replication modes vary by database type.
- Custom credentials use
DB_USERandDB_PASS. - SLB access controls which cluster layers are externally exposed.
- Users created after installation must also be added to ProxySQL for proxy-layer authentication.
