{"id":16451718,"url":"https://github.com/jnidzwetzki/mysql-ha-cloud","last_synced_at":"2025-09-15T08:13:21.512Z","repository":{"id":56157499,"uuid":"302598288","full_name":"jnidzwetzki/mysql-ha-cloud","owner":"jnidzwetzki","description":"This container image provides a highly available and replicated MySQL installation in Kubernetes or Docker Swarm. Consul, ProxySQL, and XtraBackup are used for leader election, load distribution, and backups. ","archived":false,"fork":false,"pushed_at":"2024-10-24T16:49:24.000Z","size":929,"stargazers_count":40,"open_issues_count":3,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-04T14:37:38.317Z","etag":null,"topics":["cluster","consul","docker","docker-swarm","high-availability","kubernetes","mysql","mysql-replication"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jnidzwetzki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-09T09:44:39.000Z","updated_at":"2025-03-01T10:33:08.000Z","dependencies_parsed_at":"2022-08-15T13:50:21.601Z","dependency_job_id":null,"html_url":"https://github.com/jnidzwetzki/mysql-ha-cloud","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jnidzwetzki/mysql-ha-cloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fmysql-ha-cloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fmysql-ha-cloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fmysql-ha-cloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fmysql-ha-cloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnidzwetzki","download_url":"https://codeload.github.com/jnidzwetzki/mysql-ha-cloud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fmysql-ha-cloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275225895,"owners_count":25427014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","consul","docker","docker-swarm","high-availability","kubernetes","mysql","mysql-replication"],"created_at":"2024-10-11T10:10:06.498Z","updated_at":"2025-09-15T08:13:21.480Z","avatar_url":"https://github.com/jnidzwetzki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MySQL-HA-Cloud - A Highly-Available Self-Hosted MySQL Cloud Container Orchestrator\n\u003ca href=\"https://github.com/jnidzwetzki/mysql-ha-cloud/actions/workflows/build.yml\"\u003e\n  \u003cimg alt=\"Build Status\" src=\"https://github.com/jnidzwetzki/mysql-ha-cloud/actions/workflows/build.yml/badge.svg\"\u003e\n\u003c/a\u003e\n\u003ca href=\"http://makeapullrequest.com\"\u003e\n \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" /\u003e\n\u003c/a\u003e\u003ca href=\"https://gitter.im/mysql-ha-cloud/Lobby?utm_source=share-link\u0026utm_medium=link\u0026utm_campaign=share-link\"\u003e\n  \u003cimg alt=\"Join the chat at https://gitter.im/mysql-ha-cloud/Lobby\" src=\"https://badges.gitter.im/Join%20Chat.svg\"\u003e\n\u003c/a\u003e\u003ca href=\"https://hub.docker.com/repository/docker/jnidzwetzki/mysql-ha-cloud\"\u003e\u003cimg src=\"https://img.shields.io/docker/stars/jnidzwetzki/mysql-ha-cloud.svg\"\u003e\n \u003c/a\u003e\n\n\u003cbr\u003e\nThis project provides a container image for a highly-available MySQL installation that can be deployed to Kubernetes or Docker Swarm environments.\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n**Project state:** Beta version available\n\n## Architecture\n\u003cimg src=\"docs/images/architecture.png\" width=\"500\"\u003e\n\nThe `mysql-ha-cloud` container image contains a [MySQL 8.0 Server](https://dev.mysql.com/doc/relnotes/mysql/8.0/en/), [Consul](https://www.hashicorp.com/products/consul) for the service discovery, health checks of the nodes, and the MySQL replication leader election. [ProxySQL](https://proxysql.com/) provides the entry point for the client; the software forwards the connections of the client to the MySQL nodes. Write requests are send to the replication leader, and read requests are sent to the replication follower. In addition, [MinIO](https://min.io/) is used as backup storage and to bootstrap the replication follower. Backups are created by using [XtraBackup](https://www.percona.com/software/mysql-database/percona-xtrabackup) without creating table locks. \n\nContainer Orchestrators like [Kubernetes](https://kubernetes.io/) or [Docker Swarm](https://docs.docker.com/get-started/swarm-deploy/) can be used to deploy the provided [container image](https://hub.docker.com/repository/docker/jnidzwetzki/mysql-ha-cloud).\n\nThe complete architecture is highly-available; failing and newly started containers are handled automatically. A new replication leader is automatically elected if the current leader fails. ProxySQL redirects database connections transparently to the nodes; the complete distribution and fail-over logic are hidden from the client applications. The solution is also horizontal scalable, new MySQL replication follower nodes can be added, and the query load is automatically distributed to these nodes. \n\n## Features\n\n* ✅ Automatic (non locking) backups on S3 Buckets using Xtrabackup and MinIO\n* ✅ Automatic MySQL replication leader election\n* ✅ Automatic MySQL replication leader configuration and fail-over\n* ✅ Automatic MySQL replication follower configuration\n* ✅ Automatic MySQL provisioning\n* ✅ Transparent connection routing for read-/write-splits using ProxySQL\n* ✅ Horizontal scalable\n* ✅ Compatible with Kubernetes and Docker Swarm\n\n## What is The Main Focus of This Project?\n\nThis project provides a robust, tested, and easy to deploy container image for self-hosted MySQL cloud installations. The goal is that everybody can deploy highly-available and scalable MySQL installations and eliminate the DBMS as a single point of failure in his architecture.\n\n## Why Do I Need MySQL-HA-Cloud?\n\nIn today's software development, robust applications are often developed as stateless cloud-native containers. Such containers can be easily moved between hosts, automatically restarted on failures, and replicated to handle increasing workloads. On the other hand, data are stored in relational database systems (RDBMS), which are often running on bare-metal hardware. Relational databases are stateful applications that are hard to scale, and they are often a single point of failure; high availability (HA) is rarely implemented.\n\n## Are NoSQL Databases a Solution?\n\nNoSQL databases are mostly cloud-native applications; however, they leak of the support of a full flagged relational database. Features such as transactions, complex data models, or consistency are omitted to make these systems horizontal scalable and fault-tolerant. However, simple tasks that can easily be implemented by using a relational database (e.g., an increasing counter, secondary indexes, isolation of uncommitted data, or joins) can be hard to implement. Therefore, relational databases are still used by moderns applications. \n\n## Deployment and Usage Examples\n* Deploymnet using [Docker Swarm](docs/deployment-docker-swarm.md)\n* Deploymnet using [Kubernetes](docs/deployment-kubernetes.md)\n\n## Are There Other Solutions?\n\nOf course, there are other projects that also focus on highly available MySQL systems. For instance:\n\n* [MySQL replication](https://dev.mysql.com/doc/refman/8.0/en/replication.html)\n* [Galera cluster for MySQL](https://galeracluster.com/products/)\n* [MySQL InnoDB Cluster](https://dev.mysql.com/doc/refman/8.0/en/admin-api-userguide.html)\n* [Signal 18 replication manager](https://signal18.io/products/srm)\n* [Autopilot pattern for MySQL](https://github.com/autopilotpattern/mysql)\n* [Percona Kubernetes Operator for Percona XtraDB Cluster](https://www.percona.com/doc/kubernetes-operator-for-pxc/index.html)\n\n## What's next?\n* If you like the project, please give it a star on GitHub!\n* For more information see [https://github.com/jnidzwetzki](https://github.com/jnidzwetzki).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnidzwetzki%2Fmysql-ha-cloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnidzwetzki%2Fmysql-ha-cloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnidzwetzki%2Fmysql-ha-cloud/lists"}