MySQL InnoDB Cluster

Deploy a MySQL InnoDB Cluster for high availability

Deploy MySQL InnoDB Cluster

initService - delete when done

railwayapp-templates/mysql-cluster

Just deployed

mysql3

railwayapp-templates/mysql-cluster

Just deployed

/var/lib/mysql

mysql2

railwayapp-templates/mysql-cluster

Just deployed

/var/lib/mysql

mysql1

railwayapp-templates/mysql-cluster

Just deployed

/var/lib/mysql

mysql router

mysql/mysql-router

Just deployed

This template deploys a MySQL InnoDB Cluster for a more highly available and redundant data layer.

Requirements

You will need a Railway Public API token for the initialization service.

Private Networking

All communication between nodes is done over the private network.

Configuration Tuning

To tune the configuration of the MySQL Cluster, refer to the MySQL documentation or the documentation page in Docker Hub.

Connecting to the Cluster

An instance of the MySQL Router is deployed with the cluster. It is recommended to connect to the cluster via the MySQL router, instead of connecting to any one of the nodes directly.

For an example client which connects via the router, see the exampleApps folder in the source repo.

Template Source

The source for this template can be found in the Railway Templates GitHub.

The MySQL nodes are built almost directly from the official MySQL image in Docker Hub, with the only customization being the addition of a my.cnf file.

Resources


Template Content

initService - delete when done

railwayapp-templates/mysql-cluster

mysql router

mysql/mysql-router

More templates in this category

View Template
ReadySet
A lightweight caching engine for Postgres

View Template
Simple S3
Deploy a S3-compatible storage service with a pre-named bucket.

View Template
Flare
A modern, lightning-fast file sharing platform built for self-hosting