The embodiment of the invention provides a
failover method and device for a read-write separation
database cluster, equipment and a medium, and the method comprises the steps: building a
connection pool group according to the node information of a plurality of nodes, the
connection pool group comprises a plurality of independent connection pools, and each independent
connection pool corresponds to one node; periodically acquiring node state information of each node and connection state information of the physical connection in each independent connection
pool; updating an independent connection
pool corresponding to each node according to the node state information and the connection state information; and when it is detected that a target node fault exists, determining a target connection
pool according to the load state information of the new independent connection pool, the target connection pool being used for responding to the service request. Through a connection pool group architecture, a state
timer, idle
connection management and a load balancing strategy, rapid fault response, efficient
resource utilization, development complexity reduction and dynamic cluster
adaptation are realized, so that the stability and service continuity of a
database cluster are remarkably improved.