Detailed explanation of MySQL high availability solution

1. Heartbeat+DRBD+MySQL High Availability Solution

1. Introduction to Heartbeat+DRBD+MySQL High Availability Solution

This solution uses Heartbeat dual-machine hot backup software to ensure the high stability and continuity of the database, and the data consistency is guaranteed by the tool DRBD. By default, only one mysql is working. When the main mysql server has a problem, the system will automatically switch to the standby server to continue providing services. When the main database is repaired, the service will be switched back to continue to be provided by the main mysql server.

Advantages: high security, high stability, high availability, automatic switching in case of failure.

Disadvantages: Only one server provides services, the cost is relatively high, it is not convenient to expand, and split brain may occur.

It is suitable for scenarios where the database access volume is not too large, the access volume will not increase too quickly in a short period of time, and the database availability is very high.

2. Software introduction

Heartbeat official site: http://linux-ha.org/wiki/Main_Page

Heartbeat can quickly transfer resources (VIP addresses and program services) from a faulty server to another normal server to provide services. Heartbeat is similar to keepalived. Heartbeat can implement the failover function, but cannot implement health checks on the backend

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/132133799