ruoyi0531 / moha

MoHA(Mobike High Availability): A MySQL/Postgres high availability supervisor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mysql-agent

中文文档

What is mysql-agent?

mysql-agent provides the high availability(HA) for cross-region MySQL clusters, by automating master failover and fast master switch.

  • High Availability

    Master failure detection and automating master failover enables master switch in a few seconds.

  • Brain Split Omission

    By configuring proper lease ttl, mysql-agent enables at most one master in the cluster at any time.

  • Cross AZ Topology

    Leveraging etcd as the service discovery, mysql-agent prevent its implementation from VIP, so that the cross-AZ MySQL cluster is able to be build via mysql-agent.

  • Manual Master/Slave Switch

    Besides the automated failover as described below, mysql-agent provides the ability to switch master manually.

Quick Start

Development Environment Setup

make init

make init does the following

  • check and install dep
  • check and install golint
  • check and install goimports
  • add git commit hook
  • prepare testing framework

now you can do development on your local machine

Local Machine Running Environment Setup

make env-up

Create Local Machine Running Agents, AKA Test Code on Local Machine

make docker-agent
make start-agents

Local Machine Running Environment Destroy

make clean-data

Roadmap

Roadmap

License

This project is under the Apache 2.0 license. See the LICENSE file for details.

Acknowledgments

  • Thanks rxi for the lightweight log framework
  • Thanks juju/errors for the error handling framework

About

MoHA(Mobike High Availability): A MySQL/Postgres high availability supervisor

License:Apache License 2.0


Languages

Language:Go 83.9%Language:C 5.2%Language:Shell 3.8%Language:Makefile 3.4%Language:Python 3.4%Language:Dockerfile 0.4%